qemumonitortestutils: Don't skip va_end() on error path

When allocation of memory failed the error path didn't call va_end()
causing a coverity failure.

Reported by John Ferlan.
This commit is contained in:
Peter Krempa 2013-08-01 16:33:23 +02:00
parent ae9ef97b9b
commit 8f95d5d84c

View File

@ -669,7 +669,7 @@ qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
va_start(args, response);
if (VIR_ALLOC(data) < 0)
return -1;
goto error;
if (VIR_STRDUP(data->command_name, cmdname) < 0 ||
VIR_STRDUP(data->response, response) < 0)