From: Ralph Corderoy Date: Fri, 21 Oct 2016 23:18:39 +0000 (+0100) Subject: Replace `if (p) free(p)' with `mh_xfree(p)'. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/6420adb9d93a17d3d16ae17bb67b012273fa0e8d?ds=inline;hp=c57f93a88ffee4eb75b32bdc479e271f04e32b94 Replace `if (p) free(p)' with `mh_xfree(p)'. --- diff --git a/sbr/context_del.c b/sbr/context_del.c index 5889a17f..4b4e285e 100644 --- a/sbr/context_del.c +++ b/sbr/context_del.c @@ -8,6 +8,7 @@ */ #include +#include /* * Delete a key/value pair from the context/profile list. @@ -28,8 +29,7 @@ context_del (char *key) else m_defs = np->n_next; free (np->n_name); - if (np->n_field) - free (np->n_field); + mh_xfree(np->n_field); free ((char *) np); ctxflags |= CTXMOD; return 0;