From 353379e5a18ec6707750639e19156bbac1c8d8ce 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/whom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uip/whom.c b/uip/whom.c index 688950c9..411c4770 100644 --- a/uip/whom.c +++ b/uip/whom.c @@ -8,6 +8,7 @@ */ #include +#include #include #ifndef CYRUS_SASL @@ -150,7 +151,7 @@ main (int argc, char **argv) if ((cp = context_find ("Aliasfile"))) { char *dp = NULL; - for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) { + for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) { vec[vecp++] = "-alias"; vec[vecp++] = *ap; } -- 2.56.0