diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index ce5349bd71..380bcdc116 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -1881,13 +1881,13 @@ try_command: if (qemudParseDriveAddReply(reply, driveAddr) < 0) { if (!tryOldSyntax && strstr(reply, "invalid char in expression")) { VIR_FREE(reply); + VIR_FREE(cmd); tryOldSyntax = 1; goto try_command; } qemudReportError (NULL, NULL, NULL, VIR_ERR_OPERATION_FAILED, _("adding %s disk failed: %s"), drivestr, reply); - VIR_FREE(reply); - return -1; + goto cleanup; } ret = 0;