diff options
author | Don Lewis <truckman@FreeBSD.org> | 2016-05-25 07:43:32 +0000 |
---|---|---|
committer | Don Lewis <truckman@FreeBSD.org> | 2016-05-25 07:43:32 +0000 |
commit | 65380b5f2f0a06d1aaa9e26282b2d7270b375d07 (patch) | |
tree | 371c88f09994cd4c7e68d2040e69eb8ffde8b30b /lib | |
parent | 429bf952ae9b1bcddf4b24473aa3413123203123 (diff) | |
download | src-65380b5f2f0a06d1aaa9e26282b2d7270b375d07.tar.gz src-65380b5f2f0a06d1aaa9e26282b2d7270b375d07.zip |
Call closedir() before returning from fetchListFile() to avoid a leak.
Reported by: Coverity
CID: 1016697
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=300666
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfetch/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c index 7b6462f5b69c..ab6b4b7089e8 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); } |