tests: Need to initialize 'test' properly on error path

In the error path, the test buffer is free'd, but due to how the free
routine is written the 'test' buffer pointer does not return to the caller
as NULL and then the free'd buffer address is returned to the caller.
This commit is contained in:
John Ferlan 2013-01-22 09:15:50 -05:00 committed by Peter Krempa
parent 618a5b33d4
commit 35c30522a5

View File

@ -536,6 +536,7 @@ no_memory:
error:
VIR_FREE(tmpdir_template);
qemuMonitorTestFree(test);
test = NULL;
goto cleanup;
}