From 5aca3c49929713d3274ab0ac0b5f87522dd5f9d4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 30 Nov 2012 21:06:59 -0500 Subject: [PATCH] cally-util: Don't free a NULL pointer The only place key_event can not be NULL is in this branch. Spotted by Coverity. https://bugzilla.gnome.org/show_bug.cgi?id=689496 --- clutter/cally/cally-util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clutter/cally/cally-util.c b/clutter/cally/cally-util.c index 501f44b09..0a81471f5 100644 --- a/clutter/cally/cally-util.c +++ b/clutter/cally/cally-util.c @@ -358,10 +358,10 @@ cally_key_snooper (ClutterActor *actor, /* func data is inside the hash table */ consumed = g_hash_table_foreach_steal (new_hash, notify_hf, key_event); g_hash_table_destroy (new_hash); - } - g_free (key_event->string); - g_free (key_event); + g_free (key_event->string); + g_free (key_event); + } return (consumed ? 1 : 0); }