Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 5183091

Browse files
committed
[CID 16621] revxml: Fix memory leak in XML_ListByAttributeValue()
`XML_ListByAttributeValue()` was leaking each attribute value. Attribute values are allocated with `strdup()`, and therefore should be destroyed with `free()`. Coverity-ID: 16621
1 parent 0c7ae50 commit 5183091

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

revxml/src/revxml.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,6 +2096,7 @@ void XML_ListByAttributeValue(char *args[], int nargs, char **retstring,
20962096
if (attributevalue){
20972097
util_concatstring(attributevalue, strlen(attributevalue),
20982098
result, buflen , bufsize);
2099+
free(attributevalue);
20992100
}
21002101
util_concatstring(itemsep, itemseplen,result, buflen , bufsize);
21012102
}

0 commit comments

Comments
 (0)