Various memory and file resource cleanup after valgrind tests

This commit is contained in:
Olof hagsand 2024-06-23 18:46:44 +02:00
parent 78cd42c15d
commit c2841d6e40
7 changed files with 17 additions and 12 deletions

View file

@ -345,6 +345,10 @@ xpath_optimize_check(xpath_tree *xs,
else if ((ret = xpath_list_optimize_fn(xs, xv, xvec)) < 0)
goto done;
else if (ret == 1){
if (xvec0 && *xvec0){
free(*xvec0);
*xvec0 = NULL;
}
if (clixon_xvec_extract(xvec, xvec0, xlen0, NULL) < 0){
goto done;
}