mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
test: Fix memory leak in testParseXMLDocFromFile
Since ceb3255c, @absFile is leaked. Found by Coverity. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
16818ad4a3
commit
072f6d6e43
@ -781,7 +781,7 @@ testParseXMLDocFromFile(xmlNodePtr node, const char *file, const char *type)
|
||||
{
|
||||
xmlNodePtr ret = NULL;
|
||||
xmlDocPtr doc = NULL;
|
||||
char *absFile = NULL;
|
||||
g_autofree char *absFile = NULL;
|
||||
g_autofree char *relFile = NULL;
|
||||
|
||||
if ((relFile = virXMLPropString(node, "file"))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user