not only de-allocate the vector, but also remove it from the list.
This is to prevent a crash when after simulating with a buggy input like: save all @q1[nonesense] (non-existing parameter) a command 'print all' is given.
This commit is contained in:
parent
935ed58ce6
commit
f0789ce3e4
|
|
@ -43,7 +43,7 @@ struct pnode *ft_getpnames_from_string(const char *sz, bool check)
|
||||||
* structure must also be freed if the check fails since it is not
|
* structure must also be freed if the check fails since it is not
|
||||||
* being returned. */
|
* being returned. */
|
||||||
if (check && !checkvalid(pn)) {
|
if (check && !checkvalid(pn)) {
|
||||||
dvec_free(pn->pn_value);
|
vec_free_x(pn->pn_value);
|
||||||
free_pnode(pn);
|
free_pnode(pn);
|
||||||
return (struct pnode *) NULL;
|
return (struct pnode *) NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue