[glib] gsubprocess: Add a missing va_end() call



commit e1243d11f000e18436b439f5655532801a71aeec
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri May 16 22:09:29 2014 +0100

    gsubprocess: Add a missing va_end() call
    
    Coverity issues: #1214070, #1214069
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730278

 gio/gsubprocess.c         |    1 +
 gio/gsubprocesslauncher.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index f77436c..22e7498 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -686,6 +686,7 @@ g_subprocess_new (GSubprocessFlags   flags,
   while ((arg = va_arg (ap, const gchar *)))
     g_ptr_array_add (args, (gchar *) arg);
   g_ptr_array_add (args, NULL);
+  va_end (ap);
 
   result = g_subprocess_newv ((const gchar * const *) args->pdata, flags, error);
 
diff --git a/gio/gsubprocesslauncher.c b/gio/gsubprocesslauncher.c
index c40d17d..8c61b9d 100644
--- a/gio/gsubprocesslauncher.c
+++ b/gio/gsubprocesslauncher.c
@@ -703,6 +703,7 @@ g_subprocess_launcher_spawn (GSubprocessLauncher  *launcher,
     g_ptr_array_add (args, (gchar *) arg);
 
   g_ptr_array_add (args, NULL);
+  va_end (ap);
 
   result = g_subprocess_launcher_spawnv (launcher, (const gchar * const *) args->pdata, error);
 


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