From 9a3145b9f3cb0d7d570230aaa6193f87e3bea604 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Tue, 8 Aug 2006 23:29:03 +0000 Subject: These are all patches from Kjartan Maraas with cleanups of bugs found from Coverity reports: * dbus/dbus-sysdeps-util.c (_dbus_write_pid_file): close the file on error to avoid a leak * bus/expirelist.c (bus_expire_list_test): Check for NULL on dbus_new0 * bus/activation.c (update_directory): remove dead code * bus/config-parser.c (merge_service_context_hash, start_selinux_child): Fix some leaks * bus/bus.c (process_config_every_time): Fixed a leak * bus/desktop-file.c (parse_key_value): Fixed leak * bus/selinux.c (bus_selinux_id_table_insert): Fixed leak --- bus/selinux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bus/selinux.c') diff --git a/bus/selinux.c b/bus/selinux.c index 5ed7e388..e5f26da2 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -756,7 +756,11 @@ bus_selinux_id_table_insert (DBusHashTable *service_table, if (avc_context_to_sid ((char *) service_context, &sid) < 0) { if (errno == ENOMEM) - return FALSE; + { + dbus_free (key); + return FALSE; + } + _dbus_warn ("Error getting SID from context \"%s\": %s\n", (char *) service_context, _dbus_strerror (errno)); -- cgit