mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 18:46:16 +00:00
Desktop: Fix memory leak during XSLT transformation.
Fix a memory leak occurring during XSLT transformations. Fixes #3899. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
361baeda01
commit
d7bfb9d61e
1 changed files with 6 additions and 1 deletions
|
@ -2347,8 +2347,13 @@ static xmlDoc *test_xslt_transforms(xmlDoc *doc, const struct xml_params *params
|
|||
if ((strcasecmp((const char *)root_element->name, info->root) == 0)) {
|
||||
if (info->attribute == NULL)
|
||||
break;
|
||||
else if (xmlGetProp(root_element, (const xmlChar *)info->attribute) != NULL)
|
||||
|
||||
void *prop = xmlGetProp(root_element, (const xmlChar *)info->attribute);
|
||||
if (prop != NULL) {
|
||||
free(prop);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
info++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue