summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-27 19:08:10 +0200
committerVolker Lendecke <vl@samba.org>2011-03-27 22:22:10 +0200
commit7c868e61747350d932b1aee03c1d0d8b4c3ed726 (patch)
treea681c954d62edf3b3a8f5e84e2e76cef58c98e22 /source3
parent592c669d9ddeb3a39ed8472c633c7deace33a269 (diff)
downloadsamba-7c868e61747350d932b1aee03c1d0d8b4c3ed726.tar.gz
samba-7c868e61747350d932b1aee03c1d0d8b4c3ed726.tar.bz2
samba-7c868e61747350d932b1aee03c1d0d8b4c3ed726.zip
s3: Fix Coverity ID 83: RESOURCE_LEAK
Diffstat (limited to 'source3')
-rw-r--r--source3/client/clitar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index bef53dcbbc..ac891aa7e8 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1206,16 +1206,19 @@ static void do_tarput(void)
DEBUG(0, ("Skipping %s...\n", finfo.name));
if ((next_block(tarbuf, &buffer_p, tbufsiz) <= 0) && !skip_file(finfo.size)) {
DEBUG(0, ("Short file, bailing out...\n"));
+ SAFE_FREE(longfilename);
return;
}
break;
case -1:
DEBUG(0, ("abandoning restore, -1 from read tar header\n"));
+ SAFE_FREE(longfilename);
return;
case 0: /* chksum is zero - looks like an EOF */
DEBUG(0, ("tar: restored %d files and directories\n", ntarf));
+ SAFE_FREE(longfilename);
return; /* Hmmm, bad here ... */
default: