Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2003 09:15:57 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Dag-Erling Smorgrav <des@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libfetch ftp.c
Message-ID:  <20030829091449.Y43295@root.org>
In-Reply-To: <20030829155418.3786816A556@hub.freebsd.org>
References:  <20030829155418.3786816A556@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030829091449.Y43295>