From 20d3c483e8b43bed67973a33ab20cb71c005d3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Sat, 15 Jun 2019 12:01:05 +0200 Subject: [PATCH] tests: qemuMonitorReportError: use VIR_AUTOFREE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko --- tests/qemumonitortestutils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 806c0dfa66..691111cbac 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -197,8 +197,8 @@ qemuMonitorReportError(qemuMonitorTestPtr test, const char *errmsg, ...) { va_list msgargs; VIR_AUTOFREE(char *) tmp = NULL; - char *msg = NULL; - char *jsonmsg = NULL; + VIR_AUTOFREE(char *) msg = NULL; + VIR_AUTOFREE(char *) jsonmsg = NULL; int ret = -1; va_start(msgargs, errmsg); @@ -219,8 +219,6 @@ qemuMonitorReportError(qemuMonitorTestPtr test, const char *errmsg, ...) cleanup: va_end(msgargs); - VIR_FREE(msg); - VIR_FREE(jsonmsg); return ret; }