mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
bhyve: fix memory leaks in bhyvexml2argvtest
* virNetDevTapCreateInBridgePort() mock: free '*ifname' before strdupping a hardoded value to it * testCompareXMLToArgvFiles(): unref 'conn' object in cleanup * testCompareXMLToArgvHelper(): free 'ldargs' and 'dmargs' in cleanup
This commit is contained in:
@@ -86,6 +86,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
virCommandFree(cmd);
|
||||
virCommandFree(ldcmd);
|
||||
virDomainDefFree(vmdef);
|
||||
virObjectUnref(conn);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -117,6 +118,8 @@ testCompareXMLToArgvHelper(const void *data)
|
||||
cleanup:
|
||||
VIR_FREE(xml);
|
||||
VIR_FREE(args);
|
||||
VIR_FREE(ldargs);
|
||||
VIR_FREE(dmargs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user