Skip to content

Commit

Permalink
xml parser BUGFIX memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jan 25, 2021
1 parent 6d77bc7 commit dd54b2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/parser_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ xml_parse_data(struct ly_ctx *ctx, struct lyxml_elem *xml, struct lyd_node *pare
if (!dattr->value.string) {
/* problem with resolving value as xpath */
dattr->value.string = dattr->value_str;
lyd_free_attr(ctx, NULL, dattr, 0);
goto unlink_node_error;
}
lydict_remove(ctx, dattr->value_str);
Expand Down

0 comments on commit dd54b2e

Please sign in to comment.