tests: qemuMonitorTestAddInvalidCommandResponse: VIR_AUTOFREE

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2019-06-15 12:07:04 +02:00
parent 3f0713a0b1
commit e6d6a56fef

View File

@ -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);
}