summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2016-06-01 17:45:00 +0000
committertruckman <truckman@FreeBSD.org>2016-06-01 17:45:00 +0000
commit10ba6fd1f4dd2350e1c4436c337104d86dc214b0 (patch)
treeece6ff748582dcd454da66c00fd07d5daa5b2b8f /lib
parent49dc8a6f534cb20087ad9af6fa54756030720c9e (diff)
downloadFreeBSD-src-10ba6fd1f4dd2350e1c4436c337104d86dc214b0.zip
FreeBSD-src-10ba6fd1f4dd2350e1c4436c337104d86dc214b0.tar.gz
MFC r300666
Call closedir() before returning from fetchListFile() to avoid a leak. Reported by: Coverity CID: 1016697
Diffstat (limited to 'lib')
-rw-r--r--lib/libfetch/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c
index 7b6462f..ab6b4b7 100644
--- a/lib/libfetch/file.c
+++ b/lib/libfetch/file.c
@@ -149,5 +149,6 @@ fetchListFile(struct url *u, const char *flags __unused)
fetch_add_entry(&ue, &size, &len, de->d_name, &us);
}
+ closedir(dir);
return (ue);
}
OpenPOWER on IntegriCloud