Eliminate coredump problem introduced by last commit.
Noticed by: Guido van Rooij <guido at gvr dot org>
This commit is contained in:
parent
8cc56e0ecb
commit
8cb6926e16
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152415
@ -931,7 +931,10 @@ addarg(const char *cp)
|
||||
crash();
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
arglist[argcount++] = strdup(cp);
|
||||
if (cp != NULL)
|
||||
arglist[argcount++] = xstrdup(cp);
|
||||
else
|
||||
arglist[argcount++] = NULL;
|
||||
|
||||
}
|
||||
|
||||
@ -943,7 +946,10 @@ putarg(int place, const char *cp)
|
||||
crash();
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
arglist[place] = strdup(cp);
|
||||
if (cp != NULL)
|
||||
arglist[place] = xstrdup(cp);
|
||||
else
|
||||
arglist[place] = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user