prevent false freeing of vector

This commit is contained in:
Holger Vogt 2020-02-13 21:32:02 +01:00
parent 129b219ed2
commit 89ea46e39a
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ void free_pnode_x(struct pnode *t)
free_pnode(t->pn_right);
free_pnode(t->pn_next);
tfree(t->pn_name); /* va: it is a copy() of original string, can be free'd */
if (t->pn_value && !(t->pn_value->v_flags & VF_PERMANENT)) {
if (t->pn_use == 1 && t->pn_value && !(t->pn_value->v_flags & VF_PERMANENT)) {
vec_free(t->pn_value); /* patch by Stefan Jones */
}
txfree(t);