diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c index 7520372f..359935d0 100644 --- a/src/polkit/polkitsystembusname.c +++ b/src/polkit/polkitsystembusname.c @@ -566,6 +566,7 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName *system_bus } g_variant_unref (result); + g_variant_iter_free (iter); if (out_uid) *out_uid = uid; diff --git a/src/polkitbackend/polkitbackendactionpool.c b/src/polkitbackend/polkitbackendactionpool.c index 1011878b..b691f164 100644 --- a/src/polkitbackend/polkitbackendactionpool.c +++ b/src/polkitbackend/polkitbackendactionpool.c @@ -577,6 +577,7 @@ ensure_all_files (PolkitBackendActionPool *pool) if (error != NULL) { g_warning ("Error enumerating files in %s: %s", dir_name, error->message); + g_error_free (error); } else { diff --git a/src/polkitbackend/polkitd.c b/src/polkitbackend/polkitd.c index de0aa3f5..4af5f416 100644 --- a/src/polkitbackend/polkitd.c +++ b/src/polkitbackend/polkitd.c @@ -99,9 +99,9 @@ on_name_acquired (GDBusConnection *connection, } static gboolean -on_sigint (gpointer user_data) +on_sigint_sigterm (gpointer user_data) { - g_print ("Handling SIGINT\n"); + g_print ("Handling %s\n", (const char *) user_data); g_main_loop_quit (loop); return TRUE; } @@ -268,8 +268,12 @@ main (int argc, loop = g_main_loop_new (NULL, FALSE); sigint_id = g_unix_signal_add (SIGINT, - on_sigint, - NULL); + on_sigint_sigterm, + "SIGINT"); + + sigint_id = g_unix_signal_add (SIGTERM, + on_sigint_sigterm, + "SIGTERM"); sighup_id = g_unix_signal_add (SIGHUP, on_sighup,