From c6269d023dbd4424ff7fb98e8642ea098abd6367 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Tue, 18 Oct 2016 14:52:26 +0100 Subject: [PATCH] Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- uip/whatnowsbr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index d6c336f6..f3a7eb17 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -216,7 +216,7 @@ WhatNow (int argc, char **argv) if ((drft == NULL && (drft = getenv ("mhdraft")) == NULL) || *drft == 0) drft = getcpy (m_draft (dfolder, dmsg, 1, &isdf)); - msgnam = (cp = getenv ("mhaltmsg")) && *cp ? getcpy (cp) : NULL; + msgnam = (cp = getenv ("mhaltmsg")) && *cp ? mh_xstrdup(cp) : NULL; if ((cp = getenv ("mhatfile")) && *cp) atfile = atoi(cp); @@ -1207,7 +1207,7 @@ sendit (char *sp, char **arg, char *file, int pushed) if ((cp = context_find ("Aliasfile"))) { char **ap, *dp; - dp = getcpy (cp); + dp = mh_xstrdup(cp); for (ap = brkstring (dp, " ", "\n"); ap && *ap; ap++) { vec[vecp++] = "-alias"; vec[vecp++] = *ap; @@ -1236,7 +1236,7 @@ sendit (char *sp, char **arg, char *file, int pushed) adios(NULL, "unable to create temporary file in %s", get_temp_dir()); } - distfile = getcpy (cp); + distfile = mh_xstrdup(cp); (void) m_unlink(distfile); if (link (altmsg, distfile) == NOTOK) adios (distfile, "unable to link %s to", altmsg); -- 2.56.0