diff options
author | jcid <devnull@localhost> | 2008-05-22 20:42:27 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-05-22 20:42:27 +0200 |
commit | fd2515a4fa2d803750067f1b2201fabedc0340b1 (patch) | |
tree | a955cffb92c0dca61af0e1ce28968343d8789f4b /dlib | |
parent | 457fcd06bb5eb1a7546addc85f1963e8401e21af (diff) |
- Some s/free/dFree/ in dlib.
Diffstat (limited to 'dlib')
-rw-r--r-- | dlib/dlib.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); } } |