Reported by Coverity.

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 hw/scsi/mptconfig.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/scsi/mptconfig.c b/hw/scsi/mptconfig.c
index d049825..7071854 100644
--- a/hw/scsi/mptconfig.c
+++ b/hw/scsi/mptconfig.c
@@ -123,6 +123,7 @@ static size_t vpack(uint8_t **p_data, const char *fmt, 
va_list ap1)
         va_copy(ap2, ap1);
         size = vfill(NULL, 0, fmt, ap2);
         *p_data = data = g_malloc(size);
+        va_end(ap2);
     }
     return vfill(data, size, fmt, ap1);
 }
-- 
2.5.0



Reply via email to