From: Ján Tomko Date: Sat, 15 Jun 2019 10:07:04 +0000 (+0200) Subject: tests: qemuMonitorTestAddInvalidCommandResponse: VIR_AUTOFREE X-Git-Tag: v5.5.0-rc1~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6d6a56fef05c2a6cdc2d8d0624347b8967496dc;p=thirdparty%2Flibvirt.git tests: qemuMonitorTestAddInvalidCommandResponse: VIR_AUTOFREE Signed-off-by: Ján Tomko --- 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); }