mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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:
parent
618a5b33d4
commit
35c30522a5
@ -536,6 +536,7 @@ no_memory:
|
||||
error:
|
||||
VIR_FREE(tmpdir_template);
|
||||
qemuMonitorTestFree(test);
|
||||
test = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user