[PATCH 3/3] qemumonitortestutils: Don't skip va_end() on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reported by John Ferlan.
---
 tests/qemumonitortestutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index fb76156..5697946 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -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)
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]