summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-12-04 14:01:55 +0100
committerMichael Adam <obnox@samba.org>2013-12-06 01:14:09 +0100
commitc5e73bccd5af8404df8bfaf2e6a40e93ead47f2e (patch)
tree19e294373a75eac54f631b1215b2ca24182f8625 /source3
parent4f06c681b91446f4e85d7e46bdb20b25bf222aad (diff)
downloadsamba-c5e73bccd5af8404df8bfaf2e6a40e93ead47f2e.tar.gz
s3-utils: Fix a memory leak in smbget.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/smbget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 5cb6849bf7d..28d56478d26 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -159,6 +159,7 @@ static int smb_download_dir(const char *base, const char *name, int resume)
char *newname;
if(!strcmp(dirent->name, ".") || !strcmp(dirent->name, ".."))continue;
if (asprintf(&newname, "%s/%s", tmpname, dirent->name) == -1) {
+ free(tmpname);
return 1;
}
switch(dirent->smbc_type) {