X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c6f2d14d9c38345075629af3487c2de491584ca1..ef1ba39e8dae81091b6c3e73e72825ef6edea3c6:/uip/dp.c diff --git a/uip/dp.c b/uip/dp.c index 6909239b..7e53a5c9 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -142,9 +143,8 @@ process (char *date, int length) cptr = fmt_findcomp ("text"); if (cptr) { - if (cptr->c_text) - free(cptr->c_text); - cptr->c_text = getcpy(date); + mh_xfree(cptr->c_text); + cptr->c_text = mh_xstrdup(date); } fmt_scan (fmt, scanl, length, dat, NULL); fputs (charstring_buffer (scanl), stdout);