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
This commit is contained in:
Jasper St. Pierre 2012-11-30 21:06:59 -05:00
parent 184b8c6fa6
commit 5aca3c4992

View File

@ -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);
}