Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754256Ab1FDVzA (ORCPT ); Sat, 4 Jun 2011 17:55:00 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:57738 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364Ab1FDVy5 (ORCPT ); Sat, 4 Jun 2011 17:54:57 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=OoQbfyjJF8ruu2pTN4qaVGEyWnk1Y0ax4MxoYJ/PiApyJi6wz5THEHUR3Igwyfi8K2 M0cjJsL5t/ILIUKIBuEmFUwe1C9w0EDe5JUkRTvnNq9h51BF6ZVomuS5DXySQWQr0VUL /jEnUJjtJbAgzePSV+Q1fcBW9E0c2tzdYlH9s= Date: Sat, 4 Jun 2011 23:54:49 +0200 From: Andre Bartke To: "Michal Nazarewicz" Cc: "Andre Bartke" , gregkh@suse.de, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/usb/gadget: add missing kfree calls Message-ID: <20110604235449.6a00218c@kvasir> In-Reply-To: References: <1307216094-13570-1-git-send-email-andre.bartke@gmail.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 988 Lines: 26 On Sat, 04 Jun 2011 23:35:16 +0200 "Michal Nazarewicz" wrote: > On Sat, 04 Jun 2011 21:34:54 +0200, Andre Bartke > wrote: > > diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c > > @@ -700,6 +701,7 @@ static int rndis_reset_response(int configNr, > > rndis_reset_msg_type *buf) > > resp->AddressingReset = cpu_to_le32(1); > > params->resp_avail(params->v); > > + kfree(r); > > return 0; > > } > > Have you tested this? It does not look right to me. > rndis_add_response() allocates memory and puts the request on a > list. It is later freed in rndis_free_response(). > Nope, the only way I can test this is a build - which it does. You might be right though. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/