[clutter] actor: Plug a leak in an error path



commit 538559391ca340d014796c812f860d509c1ed4cd
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Fri Jul 15 15:53:55 2011 +0100

    actor: Plug a leak in an error path
    
    If the meta for the animation property is not found, the name of the
    property to look for is still from the token, and we need to free the
    memory allocated for it.

 clutter/clutter-actor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index a2b4486..b9f62b0 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -9490,8 +9490,6 @@ clutter_actor_find_property (ClutterAnimatable *animatable,
       klass = G_OBJECT_GET_CLASS (meta);
 
       pspec = g_object_class_find_property (klass, p_name);
-
-      g_free (p_name);
     }
   else
     {
@@ -9500,6 +9498,8 @@ clutter_actor_find_property (ClutterAnimatable *animatable,
       pspec = g_object_class_find_property (klass, property_name);
     }
 
+  g_free (p_name);
+
   return pspec;
 }
 



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