From fd2515a4fa2d803750067f1b2201fabedc0340b1 Mon Sep 17 00:00:00 2001 From: jcid Date: Thu, 22 May 2008 20:42:27 +0200 Subject: - Some s/free/dFree/ in dlib. --- dlib/dlib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'dlib/dlib.c') diff --git a/dlib/dlib.c b/dlib/dlib.c index f01314eb..aa96bb32 100644 --- a/dlib/dlib.c +++ b/dlib/dlib.c @@ -189,8 +189,7 @@ static void dStr_resize(Dstr *ds, int n_sz, int keep) ds->str = (Dstr_char_t*) dRealloc (ds->str, n_sz*sizeof(Dstr_char_t)); ds->sz = n_sz; } else { - if (ds->str) - free(ds->str); + dFree(ds->str); ds->str = dNew(Dstr_char_t, n_sz); ds->sz = n_sz; ds->len = 0; @@ -288,9 +287,9 @@ Dstr *dStr_new (const char *s) void dStr_free (Dstr *ds, int all) { if (ds) { - if (all && ds->str) - free(ds->str); - free(ds); + if (all) + dFree(ds->str); + dFree(ds); } } -- cgit v1.2.3