Revert r301689 - one-true-awk: Avoid a NULL dereference.

I got this wrong and the coverity report doesn't match the NetBSD change,
which was thought for a different version.

The change wouldn't hurt but let's wait until upstream figures this out.
This commit is contained in:
Pedro F. Giffuni 2016-06-08 19:39:44 +00:00
parent 17ce5a9b90
commit c8b6d1e472
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301691

View file

@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */
donefld = 0; /* mark $1... invalid */
donerec = 1;
}
t = s ? tostring(s) : tostring(""); /* in case it's self-assign */
t = tostring(s); /* in case it's self-assign */
if (freeable(vp))
xfree(vp->sval);
vp->tval &= ~NUM;