The Samba-Bugzilla – Attachment 17959 Details for
Bug 15403
smbget memory leak if failed to download files recursively
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
15403.txt (text/plain), 1.29 KB, created by
Volker Lendecke
on 2023-06-28 07:45:00 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2023-06-28 07:45:00 UTC
Size:
1.29 KB
patch
obsolete
>From cfcf3d22c2931451306f0ffdfb5ff6b4575a8f98 Mon Sep 17 00:00:00 2001 >From: Jones Syue <jonessyue@qnap.com> >Date: Tue, 27 Jun 2023 17:19:59 +0800 >Subject: [PATCH] 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@qnap.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Wed Jun 28 07:02:34 UTC 2023 on atb-devel-224 > >(cherry picked from commit afbed653526b572f7309e67ed742a76ef7b2b8ec) >--- > source3/utils/smbget.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c >index 5f3ac16b204..227f5c638e1 100644 >--- a/source3/utils/smbget.c >+++ b/source3/utils/smbget.c >@@ -265,6 +265,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; > } >-- >2.30.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 15403
: 17959