mpick: always point to malloc memory in parse_string

pull/150/head
Duncaen 5 years ago committed by Duncan Overbruck
parent 8c2c1640eb
commit 4b413aa6a1
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

@ -544,7 +544,7 @@ parse_string(char **s)
buf[len] = 0;
pos++;
ws();
*s = buf ? buf : "";
*s = buf ? buf : xstrdup("");
return 1;
} else if (*pos == '$') {
char t;
@ -559,7 +559,7 @@ parse_string(char **s)
*pos = 0;
*s = getenv(e);
if (!*s)
*s = "";
*s = xstrdup("");
*pos = t;
ws();
return 1;

Loading…
Cancel
Save