From f0789ce3e4e98910fc03afbca9c569ca4b5cf342 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 10 Jun 2022 15:31:52 +0200 Subject: [PATCH] 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. --- src/frontend/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/parse.c b/src/frontend/parse.c index 3fed3ba1b..f38e0e00f 100644 --- a/src/frontend/parse.c +++ b/src/frontend/parse.c @@ -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 * being returned. */ if (check && !checkvalid(pn)) { - dvec_free(pn->pn_value); + vec_free_x(pn->pn_value); free_pnode(pn); return (struct pnode *) NULL; }