[gnome-builder] rg: ensure we always va_end()



commit 75b48ab30db85bdfddd125ff7c45d8f007a8735a
Author: Christian Hergert <christian hergert me>
Date:   Sat Oct 3 15:29:03 2015 -0700

    rg: ensure we always va_end()

 contrib/rg/rg-table.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/contrib/rg/rg-table.c b/contrib/rg/rg-table.c
index 2f86cb0..775f632 100644
--- a/contrib/rg/rg-table.c
+++ b/contrib/rg/rg-table.c
@@ -342,7 +342,7 @@ rg_table_iter_set (RgTableIter *iter,
       if (column_id >= priv->columns->len)
         {
           g_critical ("No such column %d", column_id);
-          return;
+          goto cleanup;
         }
 
       column = g_ptr_array_index (priv->columns, column_id);
@@ -355,6 +355,7 @@ rg_table_iter_set (RgTableIter *iter,
   if (column_id != -1)
     g_critical ("Invalid column sentinal: %d", column_id);
 
+cleanup:
   va_end (args);
 }
 
@@ -383,7 +384,7 @@ rg_table_iter_get (RgTableIter *iter,
       if (column_id >= priv->columns->len)
         {
           g_critical ("No such column %d", column_id);
-          return;
+          goto cleanup;
         }
 
       column = g_ptr_array_index (priv->columns, column_id);
@@ -396,6 +397,7 @@ rg_table_iter_get (RgTableIter *iter,
   if (column_id != -1)
     g_critical ("Invalid column sentinal: %d", column_id);
 
+cleanup:
   va_end (args);
 }
 


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