From 0bbdf0f44f28206e2e5a8568f7444e6dc96c77e7 Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 5 Apr 2006 18:17:31 +0000 Subject: Sync with src/usr.sbin v1.70: http_expand_URL(): fclose() the fdopen()'ed filedescriptor before leaving the function (for all cases). Actual fix and sanity checking by Dillo & Wiz Coverity CID 2340 --- pkgtools/pkg_install/files/lib/ftpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkg_install/files/lib/ftpio.c b/pkgtools/pkg_install/files/lib/ftpio.c index 08a8f4b6981..dd347ec1b23 100644 --- a/pkgtools/pkg_install/files/lib/ftpio.c +++ b/pkgtools/pkg_install/files/lib/ftpio.c @@ -1,4 +1,4 @@ -/* $NetBSD: ftpio.c,v 1.18 2005/10/30 21:27:47 joerg Exp $ */ +/* $NetBSD: ftpio.c,v 1.19 2006/04/05 18:17:31 wiz Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -8,7 +8,7 @@ #include #endif #ifndef lint -__RCSID("$NetBSD: ftpio.c,v 1.18 2005/10/30 21:27:47 joerg Exp $"); +__RCSID("$NetBSD: ftpio.c,v 1.19 2006/04/05 18:17:31 wiz Exp $"); #endif /*- @@ -827,6 +827,8 @@ http_expand_URL(const char *base, char *pattern) } + fclose(fp); + /* wait for child to exit */ if (waitpid(pid, &state, 0) < 0) { /* error has been reported by child */ -- cgit v1.2.3