Fixed memory leaks

This commit is contained in:
Daniel P. Berrange
2007-07-31 14:27:12 +00:00
parent f7dd6b4d6f
commit 94711ff791
5 changed files with 21 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ static int testCompareXMLToXMLFiles(const char *xml) {
char *xmlPtr = &(xmlData[0]);
char *actual = NULL;
int ret = -1;
struct qemud_vm_def *vmdef;
struct qemud_vm_def *vmdef = NULL;
struct qemud_vm vm;
if (virtTestLoadFile(xml, &xmlPtr, MAX_FILE) < 0)
@@ -48,7 +48,7 @@ static int testCompareXMLToXMLFiles(const char *xml) {
fail:
free(actual);
qemudFreeVMDef(vmdef);
return ret;
}