Duplicate the pointer to the string containing the header so it does not get

frobbed when/if the pointer it is actually a part of gets freed.
This commit is contained in:
jmallett 2002-06-05 01:01:20 +00:00
parent fba4338887
commit 3139a6b754

View File

@ -285,7 +285,7 @@ findvar(char *p)
warnx("%s: keyword not found", p);
eval = 1;
} else if (hp)
v->header = hp;
v->header = strdup(hp);
return (v);
}