[SCM] Samba Shared Repository - branch v4-17-test updated

Jule Anger janger at samba.org
Wed Jun 28 21:04:02 UTC 2023


The branch, v4-17-test has been updated
       via  88c24655c79 s3:utils: smbget fix a memory leak
      from  f26b205786e smbclient: Fix fd leak with "showacls;ls"

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-17-test


- Log -----------------------------------------------------------------
commit 88c24655c7966af129b679535f181c7779ce0eef
Author: Jones Syue <jonessyue at qnap.com>
Date:   Tue Jun 27 17:19:59 2023 +0800

    s3:utils: smbget fix a memory leak
    
    Using smbget to download files recursively (-R).
    
    If smbget found that a file is already existed in the destination,
    smbget would said 'File exists', return early, and 'newname' allocated
    memory is never freed, this is found by valgrind.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15403
    
    Signed-off-by: Jones Syue <jonessyue at qnap.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Wed Jun 28 07:02:34 UTC 2023 on atb-devel-224
    
    (cherry picked from commit afbed653526b572f7309e67ed742a76ef7b2b8ec)
    
    Autobuild-User(v4-17-test): Jule Anger <janger at samba.org>
    Autobuild-Date(v4-17-test): Wed Jun 28 21:03:31 UTC 2023 on sn-devel-184

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

Summary of changes:
 source3/utils/smbget.c | 1 +
 1 file changed, 1 insertion(+)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 3e7c5687d83..b568429d0e9 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -264,6 +264,7 @@ static bool smb_download_dir(const char *base, const char *name, int resume)
 		if (!ok) {
 			fprintf(stderr, "Failed to download %s: %s\n",
 				newname, strerror(errno));
+			free(newname);
 			free(tmpname);
 			return false;
 		}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list