summaryrefslogtreecommitdiffstats
path: root/source/lib/dprintf.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-09-17 02:19:44 +0000
committerSimo Sorce <idra@samba.org>2001-09-17 02:19:44 +0000
commit60e907b7e8e1c008463a88ed2b076344278986ef (patch)
tree4ee87af16f736e14a0284f0ef1433b6d833a1380 /source/lib/dprintf.c
parent89833bbbd8508dcdca70dff2c94e1d8f22535f1f (diff)
downloadsamba-60e907b7e8e1c008463a88ed2b076344278986ef.tar.gz
samba-60e907b7e8e1c008463a88ed2b076344278986ef.tar.xz
samba-60e907b7e8e1c008463a88ed2b076344278986ef.zip
move to SAFE_FREE()
Diffstat (limited to 'source/lib/dprintf.c')
-rw-r--r--source/lib/dprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/dprintf.c b/source/lib/dprintf.c
index 157ce6b716f..964d63c72ff 100644
--- a/source/lib/dprintf.c
+++ b/source/lib/dprintf.c
@@ -47,7 +47,7 @@ int d_vfprintf(FILE *f, const char *format, va_list ap)
again:
p2 = malloc(maxlen);
if (!p2) {
- free(p);
+ SAFE_FREE(p);
return -1;
}
clen = convert_string(CH_UNIX, CH_DISPLAY, p, ret, p2, maxlen);
@@ -55,14 +55,14 @@ again:
if (clen >= maxlen) {
/* it didn't fit - try a larger buffer */
maxlen *= 2;
- free(p2);
+ SAFE_FREE(p2);
goto again;
}
/* good, its converted OK */
- free(p);
+ SAFE_FREE(p);
ret = fwrite(p2, 1, clen, f);
- free(p2);
+ SAFE_FREE(p2);
return ret;
}