From e6d6a56fef05c2a6cdc2d8d0624347b8967496dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Sat, 15 Jun 2019 12:07:04 +0200 Subject: [PATCH] tests: qemuMonitorTestAddInvalidCommandResponse: VIR_AUTOFREE MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko --- tests/qemumonitortestutils.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 75f6be2038..85a2fca659 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.47.2