frontend/cpitf.c, free a temporary vector which was left in `cp_istrue()'
reported by Marcel Hendrix. Using conditional expressions within a .control sequence left some garbage vectors in the current plot. For example > let ix = 0 > > while ix < 2 > let ix = ix + 1 > end > > display "display" reported a variable named "ix < 2" which was an internal temporary value in said function `cp_istrue()'
This commit is contained in:
parent
e609c7411d
commit
6ff1560487
|
|
@ -315,7 +315,12 @@ cp_istrue(wordlist *wl)
|
|||
v = ft_evaluate(names);
|
||||
|
||||
rv = !vec_iszero(v);
|
||||
free_pnode(names);
|
||||
|
||||
/* va: garbage collection for v, if pnode names is no simple value */
|
||||
if (names->pn_value == NULL && v != NULL)
|
||||
vec_free(v);
|
||||
free_pnode(names); /* free also v, if pnode names is simple value */
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue