work around a segmentation fault, plot .. vs vec

This commit is contained in:
rlar 2010-07-31 17:04:37 +00:00
parent d60bee2d40
commit 010e046e6b
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-07-31 Robert Larice
* src/frontend/parse.c :
work around a segmentation fault, when plotting
plot something vs vec
vec was freed too early
2010-07-31 Robert Larice
* src/frontend/vectors.c :
fix an ancient typo, responsible for segfault or garbage

View File

@ -416,7 +416,7 @@ 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)
if (t->pn_value && !(t->pn_value->v_flags & VF_PERMANENT))
vec_free(t->pn_value); /* patch by Stefan Jones */
tfree(t);
}