Fix a memory leak
authorDavid Zeuthen <davidz@redhat.com>
Wed, 23 Feb 2011 15:49:14 +0000 (10:49 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Wed, 23 Feb 2011 15:49:14 +0000 (10:49 -0500)
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/polkit/polkitactiondescription.c

index 0391efdb4eff05593ffe8176d774f813f1bf2339..4bd96044cfec536ec7f09b1c61acd2d7e99ec716 100644 (file)
@@ -316,6 +316,8 @@ polkit_action_description_new (const gchar                 *action_id,
   ret->implicit_any = implicit_any;
   ret->implicit_inactive = implicit_inactive;
   ret->implicit_active = implicit_active;
+  if (ret->annotations != NULL)
+    g_hash_table_unref (ret->annotations);
   ret->annotations = g_hash_table_ref (annotations);
   return ret;
 }