summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-20 09:15:26 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commit6b2b125ab910530610b5e3e4b72f6733bd1f174f (patch)
tree8d3519ab88a3ff5d7dcc55508a14163790f4e8b9 /source3/param
parentf573826f18e590dd53a0795b670e6f30a3f5cd68 (diff)
downloadsamba-6b2b125ab910530610b5e3e4b72f6733bd1f174f.tar.gz
samba-6b2b125ab910530610b5e3e4b72f6733bd1f174f.tar.bz2
samba-6b2b125ab910530610b5e3e4b72f6733bd1f174f.zip
s3-param: Don't leak file descriptor.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5bf430da4e..ce1c1d82b3 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4432,6 +4432,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
/* This must be a regular file, not a symlink, directory or
other strange filetype. */
if (!check_usershare_stat(fname, &sbuf)) {
+ close(fd);
goto out;
}