Fixed static compile of util validate

FIxed mem-leaks on xpath errors
Test: valgrind of confirmed-commit
This commit is contained in:
Olof hagsand 2022-11-25 15:21:03 +01:00
parent e27336e054
commit 2cdc78c576
5 changed files with 49 additions and 35 deletions

View file

@ -611,12 +611,12 @@ xpath_vec_ctx(cxobj *xcur,
goto done;
if (xp_eval(&xc, xptree, nsc, localonly, xrp) < 0)
goto done;
retval = 0;
done:
if (xc.xc_nodeset){
free(xc.xc_nodeset);
xc.xc_nodeset = NULL;
}
retval = 0;
done:
if (xptree)
xpath_tree_free(xptree);
return retval;