From nobody@FreeBSD.org  Wed Oct  6 14:21:09 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C238716A4D0
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Oct 2004 14:21:09 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A21AD43D46
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Oct 2004 14:21:09 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i96EL98X038832
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Oct 2004 14:21:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i96EL9g3038831;
	Wed, 6 Oct 2004 14:21:09 GMT
	(envelope-from nobody)
Message-Id: <200410061421.i96EL9g3038831@www.freebsd.org>
Date: Wed, 6 Oct 2004 14:21:09 GMT
From: Momtchil Momtchev <momtchil.momtchev@netasq.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: memory leak in libfetch
X-Send-Pr-Version: www-2.3

>Number:         72385
>Category:       bin
>Synopsis:       memory leak in libfetch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 06 14:30:25 GMT 2004
>Closed-Date:    Wed Feb 16 10:16:41 GMT 2005
>Last-Modified:  Wed Feb 16 10:16:41 GMT 2005
>Originator:     Momtchil Momtchev
>Release:        up to 5.3 BETA 6
>Organization:
NETASQ
>Environment:
FreeBSD garga.netasq.int 5.3-BETA5 FreeBSD 5.3-BETA5
>Description:
fetchGet() is leaking on HTTP 404 File Not Found
>How-To-Repeat:
fetchGet() is leaking on HTTP 404 File Not Found
>Fix:
                fetchFreeURL(url);
        if (purl)
                fetchFreeURL(purl);
-       if (conn != NULL)
-               _fetch_close(conn);
+       if (conn != NULL) {
+               if (conn->buf)
+                       free(conn->buf);
+               _fetch_close(conn);
+       }
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Wed Oct 6 14:33:32 GMT 2004 
Responsible-Changed-Why:  
Over to author. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72385 

From: Jeffrey Katcher <jmkatcher@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org, momtchil.momtchev@netasq.com
Cc:  
Subject: Re: kern/72385 memory leak in libfetch
Date: Tue, 15 Feb 2005 12:16:06 -0800 (PST)

 I ran across this bug/patch while checking on the status of my subsequently
 filed kern/76153.  I believe that my submitted fix fixes a superset including
 72385.  The observed leak is connected to every fetch transaction with an
 allocated conn, not just GETs with a 404 response.  Therefore, I'd like someone
 to cancel 72385 and incorporate the 76153 fix only.
 
 Thanks,
 
 Jeff Katcher
 
 P.S. I have been running with the fix for the last month or so with 5-STABLE
 with no problems at all, even when my (former) broadband provider was providing
 me lots of TCP connection failure modes to test with.
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Wed Feb 16 10:16:10 GMT 2005 
State-Changed-Why:  
Superseded by 76153. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72385 
>Unformatted:
