提交 35c30522 编写于 作者: J John Ferlan 提交者: Peter Krempa

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.
上级 618a5b33
......@@ -536,6 +536,7 @@ no_memory:
error:
VIR_FREE(tmpdir_template);
qemuMonitorTestFree(test);
test = NULL;
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册