fixed problem which could result in strdup(NULL)
CVS patchset: 252 CVS date: 1996/01/30 04:12:58
This commit is contained in:
parent
881145f547
commit
5764e29cdc
|
@ -21,5 +21,9 @@ void setVar(int var, char *val)
|
||||||
return ; /* XXX should we go harey carey here? */
|
return ; /* XXX should we go harey carey here? */
|
||||||
|
|
||||||
if (values[var]) free(values[var]);
|
if (values[var]) free(values[var]);
|
||||||
values[var] = strdup(val);
|
|
||||||
|
if (val)
|
||||||
|
values[var] = strdup(val);
|
||||||
|
else
|
||||||
|
values[var] = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue