git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22d1d7d
)
smbget: Fix a memory leak
author
Andreas Schneider
<asn@samba.org>
Tue, 21 Jun 2016 13:56:23 +0000
(15:56 +0200)
committer
Andreas Schneider
<asn@cryptomilk.org>
Fri, 24 Jun 2016 00:01:19 +0000
(
02:01
+0200)
Found by cppcheck.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/utils/smbget.c
patch
|
blob
|
history
diff --git
a/source3/utils/smbget.c
b/source3/utils/smbget.c
index 4909fa2ca075e056b1f4ed93a6660f8d7d8ebd43..99261e3740d6a6d0f530b2220106104d31bb0151 100644
(file)
--- a/
source3/utils/smbget.c
+++ b/
source3/utils/smbget.c
@@
-256,6
+256,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(tmpname);
return false;
}
free(newname);