提交 e6d6a56f 编写于 作者: J Ján Tomko

tests: qemuMonitorTestAddInvalidCommandResponse: VIR_AUTOFREE

Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 3f0713a0
...@@ -174,17 +174,13 @@ qemuMonitorTestAddInvalidCommandResponse(qemuMonitorTestPtr test, ...@@ -174,17 +174,13 @@ qemuMonitorTestAddInvalidCommandResponse(qemuMonitorTestPtr test,
const char *expectedcommand, const char *expectedcommand,
const char *actualcommand) const char *actualcommand)
{ {
char *msg; VIR_AUTOFREE(char *) msg = NULL;
int ret;
if (virAsprintf(&msg, "expected command '%s' got '%s'", if (virAsprintf(&msg, "expected command '%s' got '%s'",
expectedcommand, actualcommand) < 0) expectedcommand, actualcommand) < 0)
return -1; return -1;
ret = qemuMonitorTestAddErrorResponse(test, msg); return qemuMonitorTestAddErrorResponse(test, msg);
VIR_FREE(msg);
return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册