mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-13 06:34:42 -05:00
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:
@@ -669,7 +669,7 @@ qemuMonitorTestAddItemParams(qemuMonitorTestPtr test,
|
|||||||
va_start(args, response);
|
va_start(args, response);
|
||||||
|
|
||||||
if (VIR_ALLOC(data) < 0)
|
if (VIR_ALLOC(data) < 0)
|
||||||
return -1;
|
goto error;
|
||||||
|
|
||||||
if (VIR_STRDUP(data->command_name, cmdname) < 0 ||
|
if (VIR_STRDUP(data->command_name, cmdname) < 0 ||
|
||||||
VIR_STRDUP(data->response, response) < 0)
|
VIR_STRDUP(data->response, response) < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user