summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-22 09:51:42 +0200
committerVolker Lendecke <vl@samba.org>2011-04-22 10:06:36 +0200
commit726fa732facef55da6a27750f9daf12145db6639 (patch)
tree23bc33f13fb9747b84902cb0df6a13a68cfd54fd /source3
parentf9e3af71d391027de353f0240f70e425e766c0e5 (diff)
downloadsamba-726fa732facef55da6a27750f9daf12145db6639.tar.gz
samba-726fa732facef55da6a27750f9daf12145db6639.tar.bz2
samba-726fa732facef55da6a27750f9daf12145db6639.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 9939e25fb5..c0c6e83bb6 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -518,6 +518,10 @@ SMBC_opendir_ctx(SMBCCTX *context,
ip_list = (struct ip_service *)memdup(
&server_addr, sizeof(server_addr));
if (ip_list == NULL) {
+ if (dir) {
+ SAFE_FREE(dir->fname);
+ SAFE_FREE(dir);
+ }
TALLOC_FREE(frame);
errno = ENOMEM;
return NULL;