[gtk+] Don't forget to cleanup varargs



commit d3c427a7675796065737673227cfbc9430ee888a
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 14 21:14:48 2011 -0400

    Don't forget to cleanup varargs

 gtk/gtkliststore.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index 4671bfe..1844a8b 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -445,11 +445,13 @@ gtk_list_store_new (gint n_columns,
     {
       GType type = va_arg (args, GType);
       if (! _gtk_tree_data_list_check_type (type))
-	{
-	  g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
-	  g_object_unref (retval);
-	  return NULL;
-	}
+        {
+          g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
+          g_object_unref (retval);
+          va_end (args);
+
+          return NULL;
+        }
 
       gtk_list_store_set_column_type (retval, i, type);
     }



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