Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- tests/qemumonitortestutils.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 6be4de8059..c053712573 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -160,16 +160,12 @@ static int qemuMonitorTestAddUnexpectedErrorResponse(qemuMonitorTestPtr test, const char *command) { - char *msg; - int ret; + VIR_AUTOFREE(char *) msg = NULL; if (virAsprintf(&msg, "unexpected command: '%s'", command) < 0) return -1; - ret = qemuMonitorTestAddErrorResponse(test, msg); - - VIR_FREE(msg); - return ret; + return qemuMonitorTestAddErrorResponse(test, msg); } -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list