diff options
author | Volker Lendecke <vl@samba.org> | 2011-04-22 09:51:42 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-04-22 10:06:36 +0200 |
commit | 726fa732facef55da6a27750f9daf12145db6639 (patch) | |
tree | 23bc33f13fb9747b84902cb0df6a13a68cfd54fd | |
parent | f9e3af71d391027de353f0240f70e425e766c0e5 (diff) | |
download | samba-726fa732facef55da6a27750f9daf12145db6639.tar.gz samba-726fa732facef55da6a27750f9daf12145db6639.tar.xz samba-726fa732facef55da6a27750f9daf12145db6639.zip |
s3: Fix Coverity ID 2325, RESOURCE_LEAK
-rw-r--r-- | source3/libsmb/libsmb_dir.c | 4 |
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; |