Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
tests/qemumonitortestutils.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index c053712573..c14ffb23b9 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -174,17 +174,13 @@ qemuMonitorTestAddInvalidCommandResponse(qemuMonitorTestPtr test,
const char *expectedcommand,
const char *actualcommand)
{
- char *msg;
- int ret;
+ VIR_AUTOFREE(char *) msg = NULL;
if (virAsprintf(&msg, "expected command '%s' got
'%s'",
expectedcommand, actualcommand) < 0)
return -1;
- ret = qemuMonitorTestAddErrorResponse(test, msg);
-
- VIR_FREE(msg);
- return ret;
+ return qemuMonitorTestAddErrorResponse(test, msg);
}
--
2.20.1