diff options
Diffstat (limited to 'source/client/clitar.c')
-rw-r--r-- | source/client/clitar.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/client/clitar.c b/source/client/clitar.c index fff390b8bee..2beb669de90 100644 --- a/source/client/clitar.c +++ b/source/client/clitar.c @@ -194,7 +194,7 @@ static void writetarheader(int f, char *aname, int size, time_t mtime, i = strlen(b)+1; DEBUG(5, ("File name in tar file: %s, size=%d, \n", b, (int)strlen(b))); dotarbuf(f, b, TBLOCK*(((i-1)/TBLOCK)+1)); - free(b); + SAFE_FREE(b); } /* use l + 1 to do the null too */ @@ -1228,7 +1228,7 @@ static void do_tarput(void) if (longfilename != NULL) { - free(finfo.name); /* Free the space already allocated */ + SAFE_FREE(finfo.name); /* Free the space already allocated */ finfo.name = longfilename; longfilename = NULL; @@ -1454,7 +1454,7 @@ void cmd_tar(void) process_tar(); - free(argl); + SAFE_FREE(argl); } /**************************************************************************** @@ -1471,7 +1471,7 @@ int process_tar(void) #else do_tarput(); #endif - free(tarbuf); + SAFE_FREE(tarbuf); close(tarhandle); break; case 'r': @@ -1521,7 +1521,7 @@ int process_tar(void) if (ntarf) dotareof(tarhandle); close(tarhandle); - free(tarbuf); + SAFE_FREE(tarbuf); DEBUG(0, ("tar: dumped %d files and directories\n", ntarf)); DEBUG(0, ("Total bytes written: %.0f\n", (double)ttarf)); @@ -1531,9 +1531,9 @@ int process_tar(void) if (must_free_cliplist) { int i; for (i = 0; i < clipn; ++i) { - free(cliplist[i]); + SAFE_FREE(cliplist[i]); } - free(cliplist); + SAFE_FREE(cliplist); cliplist = NULL; clipn = 0; must_free_cliplist = False; @@ -1653,16 +1653,16 @@ static int read_inclusion_file(char *filename) } if (inclusion_buffer) { - free(inclusion_buffer); + SAFE_FREE(inclusion_buffer); } if (error) { if (cliplist) { char **pp; /* We know cliplist is always null-terminated */ for (pp = cliplist; *pp; ++pp) { - free(*pp); + SAFE_FREE(*pp); } - free(cliplist); + SAFE_FREE(cliplist); cliplist = NULL; must_free_cliplist = False; } |