diff options
author | Simo Sorce <idra@samba.org> | 2001-09-17 02:19:44 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-09-17 02:19:44 +0000 |
commit | 484a7c0341fe033fe26fe1e6b597ed1c456c39d4 (patch) | |
tree | c2f2344c757fffba5b6cc190e6ed13ef64b89266 /source3/lib/dprintf.c | |
parent | 31c3f7a8b2ff62d4cfc1ed9d831b95eba0da525f (diff) | |
download | samba-484a7c0341fe033fe26fe1e6b597ed1c456c39d4.tar.gz samba-484a7c0341fe033fe26fe1e6b597ed1c456c39d4.tar.bz2 samba-484a7c0341fe033fe26fe1e6b597ed1c456c39d4.zip |
move to SAFE_FREE()
(This used to be commit 60e907b7e8e1c008463a88ed2b076344278986ef)
Diffstat (limited to 'source3/lib/dprintf.c')
-rw-r--r-- | source3/lib/dprintf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/dprintf.c b/source3/lib/dprintf.c index 157ce6b716..964d63c72f 100644 --- a/source3/lib/dprintf.c +++ b/source3/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; } |