Skip to content

Commit

Permalink
Fixed: Segv in canonical xpath transform
Browse files Browse the repository at this point in the history
  • Loading branch information
olofhagsand committed Nov 20, 2024
1 parent b7b1bf7 commit 199a3fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Developers may need to change their code

### Corrected Bugs

* Fixed: Segv in canonical xpath transform
* Fixed: [Error with submodules and feature Interaction](https://github.com/clicon/clixon-controller/issues/158)
* Fixed: [Expansion removes the double quote](https://github.com/clicon/clixon/issues/524)
* Add escaping in expand_dbvar instead of automatic in cligen expand
Expand Down
2 changes: 1 addition & 1 deletion lib/src/clixon_xpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 199a3fd

Please sign in to comment.