The branch, master has been updated
       via  84786c8 libsmb: fix leak in opendir error path
      from  ca5e109 waf: Cleanup deps list for smbd

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 84786c83054731b8fc304289dfea7c6d0e40148c
Author: David Disseldorp <[email protected]>
Date:   Tue Oct 25 18:25:02 2016 +0200

    libsmb: fix leak in opendir error path
    
    Fixes CID 242325 - dir state and the talloc frame are leaked on
    user_auth_info_init() failure.
    
    Signed-off-by: David Disseldorp <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Wed Oct 26 00:58:41 CEST 2016 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/libsmb_dir.c | 6 ++++++
 1 file changed, 6 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index dd37a24..8bf3c6b 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -485,6 +485,12 @@ SMBC_opendir_ctx(SMBCCTX *context,
 
                u_info = user_auth_info_init(frame);
                if (u_info == NULL) {
+                       if (dir) {
+                               SAFE_FREE(dir->fname);
+                               SAFE_FREE(dir);
+                       }
+                       TALLOC_FREE(frame);
+                       errno = ENOMEM;
                        return NULL;
                }
                set_cmdline_auth_info_username(u_info, user);


-- 
Samba Shared Repository

Reply via email to