mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
fix double free for libxml2 < 2.13
xmlAddChild() only unlinks the second argument since libxml2 2.13.
regression from 503af105
This commit is contained in:
parent
c27d4955a4
commit
474c513ed6
1 changed files with 2 additions and 1 deletions
|
|
@ -79,7 +79,8 @@ merge_two_trees(xmlNode *dst, xmlNode *src)
|
|||
&& !strcasecmp((char *)dst->name, (char *)src->name)) {
|
||||
xmlNode *next_dst = dst->last;
|
||||
xmlNode *next_src = src->children;
|
||||
xmlAddChild(dst, src->children);
|
||||
xmlUnlinkNode(next_src);
|
||||
xmlAddChild(dst, next_src);
|
||||
xmlUnlinkNode(src);
|
||||
xmlFreeNode(src);
|
||||
src = next_src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue