]> diplodocus.org Git - nmh/commitdiff
Replace `if (p) free(p)' with `mh_xfree(p)'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:18:43 +0000 (00:18 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:18:43 +0000 (00:18 +0100)
sbr/context_replace.c

index 6a270c0..99f8ef3 100644 (file)
@@ -39,8 +39,7 @@ context_replace (char *key, char *value)
            if (strcmp (value, np->n_field)) {
                if (!np->n_context)
                    admonish (NULL, "bug: context_replace(key=\"%s\",value=\"%s\")", key, value);
-               if (np->n_field)
-                   free (np->n_field);
+                mh_xfree(np->n_field);
                np->n_field = mh_xstrdup(value);
                ctxflags |= CTXMOD;
            }