X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c6f2d14d9c38345075629af3487c2de491584ca1..5251d171e8e90a7a69f2bd740965140b6b69fcbe:/sbr/context_del.c diff --git a/sbr/context_del.c b/sbr/context_del.c index 5889a17f..b359cb75 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. @@ -22,15 +23,14 @@ context_del (char *key) for (np = m_defs, pp = NULL; np; pp = np, np = np->n_next) { if (!strcasecmp (np->n_name ? np->n_name : "", key ? key : "")) { if (!np->n_context) - admonish (NULL, "bug: context_del(key=\"%s\")", np->n_name); + inform("bug: context_del(key=\"%s\"), continuing...", np->n_name); if (pp) pp->n_next = np->n_next; else m_defs = np->n_next; free (np->n_name); - if (np->n_field) - free (np->n_field); - free ((char *) np); + mh_xfree(np->n_field); + free(np); ctxflags |= CTXMOD; return 0; }