summaryrefslogtreecommitdiff
path: root/source3/client/clitar.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-09-17 00:52:47 +0000
committerSimo Sorce <idra@samba.org>2001-09-17 00:52:47 +0000
commit77bdea1b95f0169c32ba13a4434e9cfb4089b7d3 (patch)
treec853c8925b282949f91177055b28799d3830bb20 /source3/client/clitar.c
parente2d393bd24e5b8ae3588828113993399bb105b32 (diff)
downloadsamba-77bdea1b95f0169c32ba13a4434e9cfb4089b7d3.tar.gz
samba-77bdea1b95f0169c32ba13a4434e9cfb4089b7d3.tar.bz2
samba-77bdea1b95f0169c32ba13a4434e9cfb4089b7d3.zip
move to SAFE_FREE()
(This used to be commit 29db6ef7a7c4df51adf964c0aecb1164e4ab7dee)
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r--source3/client/clitar.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 49ea5edf47..39c31625b4 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -193,7 +193,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 */
@@ -1190,7 +1190,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;
@@ -1416,7 +1416,7 @@ void cmd_tar(void)
process_tar();
- free(argl);
+ SAFE_FREE(argl);
}
/****************************************************************************
@@ -1433,7 +1433,7 @@ int process_tar(void)
#else
do_tarput();
#endif
- free(tarbuf);
+ SAFE_FREE(tarbuf);
close(tarhandle);
break;
case 'r':
@@ -1483,7 +1483,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));
@@ -1493,9 +1493,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;
@@ -1615,17 +1615,15 @@ 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;
}