summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-24 15:59:55 +0100
committerVolker Lendecke <vl@samba.org>2011-03-24 16:05:53 +0100
commit9db92bb7f9ab9461019ebbf5839c588e2d16f229 (patch)
treec832f311e7676d381c81dab1fe2039a9f79f6e15 /source3
parent15e84a9a09c5a86416e964a3258ee35718fbf45a (diff)
downloadsamba-9db92bb7f9ab9461019ebbf5839c588e2d16f229.tar.gz
samba-9db92bb7f9ab9461019ebbf5839c588e2d16f229.tar.bz2
samba-9db92bb7f9ab9461019ebbf5839c588e2d16f229.zip
s3: Fix Coverity ID 2325: RESOURCE_LEAK
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmb_dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 9f249a9a1d..13efc895c4 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -550,6 +550,10 @@ SMBC_opendir_ctx(SMBCCTX *context,
cli_shutdown(cli);
if (!workgroup || !server) {
+ if (dir) {
+ SAFE_FREE(dir->fname);
+ SAFE_FREE(dir);
+ }
errno = ENOMEM;
TALLOC_FREE(frame);
return NULL;