Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261782AbVCWS2V (ORCPT ); Wed, 23 Mar 2005 13:28:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261786AbVCWS2V (ORCPT ); Wed, 23 Mar 2005 13:28:21 -0500 Received: from smtp-roam.Stanford.EDU ([171.64.10.152]:6311 "EHLO smtp-roam.Stanford.EDU") by vger.kernel.org with ESMTP id S261782AbVCWS2P (ORCPT ); Wed, 23 Mar 2005 13:28:15 -0500 Message-Id: <200503231827.j2NIRWNR004495@smtp-roam.Stanford.EDU> From: "Yichen Xie" To: "'Herbert Xu'" Cc: , , , , Subject: RE: memory leak in net/sched/ipt.c? Date: Wed, 23 Mar 2005 10:27:32 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: Thread-Index: AcUvnALmsC8+39CcQWaO7tjvU6FmxgAOYmKw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1715 Lines: 51 Thanks for confirming. Are you guys interested in this kind of leaks? I have a list of about a hundred generated by our tool. -yichen > -----Original Message----- > From: Herbert Xu [mailto:herbert@gondor.apana.org.au] > Sent: Wednesday, March 23, 2005 3:31 AM > To: Yichen Xie > Cc: linux-kernel@vger.kernel.org; netdev@oss.sgi.com; > davem@davemloft.net; kaber@trash.net; hadi@cyberus.ca > Subject: Re: memory leak in net/sched/ipt.c? > > Yichen Xie wrote: > > Is the memory block allocated on line 315 leaked every time > > tcp_ipt_dump is called? > > It seems to be. This patch should free it. > > Signed-off-by: Herbert Xu > > BTW, please report networking bugs to netdev@oss.sgi.com. > > Thanks, > -- > Visit Openswan at http://www.openswan.org/ > Email: Herbert Xu ~{PmV>HI~} > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt > -- > ===== net/sched/ipt.c 1.14 vs edited ===== > --- 1.14/net/sched/ipt.c 2005-02-07 16:39:40 +11:00 > +++ edited/net/sched/ipt.c 2005-03-23 22:28:13 +11:00 > @@ -284,10 +284,12 @@ > tm.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); > tm.expires = jiffies_to_clock_t(p->tm.expires); > RTA_PUT(skb, TCA_IPT_TM, sizeof (tm), &tm); > + kfree(t); > return skb->len; > > rtattr_failure: > skb_trim(skb, b - skb->data); > + kfree(t); > return -1; > } > > - 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/