summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/clitar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 020c11bf62..90d06cc94e 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1112,6 +1112,7 @@ static void do_tarput(void)
/* Get us to the next block, or the first block first time around */
if (next_block(tarbuf, &buffer_p, tbufsiz) <= 0) {
DEBUG(0, ("Empty file, short tar file, or read error: %s\n", strerror(errno)));
+ SAFE_FREE(longfilename);
return;
}
@@ -1183,6 +1184,7 @@ static void do_tarput(void)
}
break;
case 'L':
+ SAFE_FREE(longfilename);
longfilename = get_longfilename(finfo);
if (!longfilename) {
DEBUG(0, ("abandoning restore\n"));