From owner-cvs-src@FreeBSD.ORG Fri Aug 29 09:15:58 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C166F16A4C0 for ; Fri, 29 Aug 2003 09:15:58 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 1173943FBF for ; Fri, 29 Aug 2003 09:15:57 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 43308 invoked by uid 1000); 29 Aug 2003 16:15:57 -0000 Date: Fri, 29 Aug 2003 09:15:57 -0700 (PDT) From: Nate Lawson To: Dag-Erling Smorgrav In-Reply-To: <20030829155418.3786816A556@hub.freebsd.org> Message-ID: <20030829091449.Y43295@root.org> References: <20030829155418.3786816A556@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libfetch ftp.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2003 16:15:58 -0000 On Fri, 29 Aug 2003, Dag-Erling Smorgrav wrote: > Modified files: > lib/libfetch ftp.c > Log: > Don't close a FILE * which we know is bogus. > > Revision Changes Path > 1.89 +0 -1 src/lib/libfetch/ftp.c > > --- src/lib/libfetch/ftp.c:1.88 Tue Aug 19 04:43:11 2003 > +++ src/lib/libfetch/ftp.c Fri Aug 29 08:54:12 2003 > @@ -1006,7 +1006,6 @@ > f = _ftp_request(url, "STAT", us, _ftp_get_proxy(flags), flags); > if (f == NULL) > return (-1); > - fclose(f); > return (0); > } > Are you sure that's bogus? According to a quick glance at _ftp_request(), it returns NULL on error, which should exit you out with the return(-1), never calling the fclose() in the error case. Welcome back! -Nate