Fixed: Segv in canonical xpath transform

This commit is contained in:
Olof hagsand 2024-11-20 15:14:02 +01:00
parent b7b1bf7aa4
commit 199a3fd88e
2 changed files with 2 additions and 1 deletions

View file

@ -1112,7 +1112,7 @@ xpath_traverse_canonical(xpath_tree *xs,
free(xs->xs_s0);
xs->xs_s0 = NULL;
}
if ((xs->xs_s0 = strdup(prefix1)) == NULL){
if (prefix1 && (xs->xs_s0 = strdup(prefix1)) == NULL){
clixon_err(OE_UNIX, errno, "strdup");
goto done;
}