[libdazzle] actions: fix leak of type strings



commit 5cfab0849904d343d8060a3afdd5322ec28e8168
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 28 01:51:45 2018 -0700

    actions: fix leak of type strings

 src/actions/dzl-widget-action-group.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/actions/dzl-widget-action-group.c b/src/actions/dzl-widget-action-group.c
index e2fbbe5..3229d8a 100644
--- a/src/actions/dzl-widget-action-group.c
+++ b/src/actions/dzl-widget-action-group.c
@@ -148,7 +148,8 @@ create_variant_type (const GType *types,
               break;
             }
 
-          return FALSE;
+          g_string_free (str, TRUE);
+          return NULL;
         }
     }
 
@@ -171,6 +172,8 @@ create_variant_type (const GType *types,
       g_hash_table_insert (cached_types, type_str, type_str);
       ret = (const GVariantType *)type_str;
     }
+  else
+    g_string_free (str, TRUE);
 
   return ret;
 }


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