one-true-awk: Avoid a NULL dereference.
CID: 270862 Obtained from: NetBSD (CVS Rev. 1.8) MFC after: 2 weeks
This commit is contained in:
parent
cadd473c52
commit
17ce5a9b90
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301689
@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
|
|||||||
donefld = 0; /* mark $1... invalid */
|
donefld = 0; /* mark $1... invalid */
|
||||||
donerec = 1;
|
donerec = 1;
|
||||||
}
|
}
|
||||||
t = tostring(s); /* in case it's self-assign */
|
t = s ? tostring(s) : tostring(""); /* in case it's self-assign */
|
||||||
if (freeable(vp))
|
if (freeable(vp))
|
||||||
xfree(vp->sval);
|
xfree(vp->sval);
|
||||||
vp->tval &= ~NUM;
|
vp->tval &= ~NUM;
|
||||||
|
Loading…
Reference in New Issue
Block a user