diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 23:29:03 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 23:29:03 +0000 |
commit | 9a3145b9f3cb0d7d570230aaa6193f87e3bea604 (patch) | |
tree | 1d24b643c7086b8732a68c3a14372482ac472c09 /bus/bus.c | |
parent | 1fa8e404a4fd9fc723b0a00be09c3c9fce0cfff3 (diff) |
These are all patches from Kjartan Maraas <kmaraas at gnome dot org>
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
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -402,11 +402,13 @@ process_config_every_time (BusContext *context, { DBusString full_address; DBusList *link; - + char *addr; + dbus_bool_t retval; _DBUS_ASSERT_ERROR_IS_CLEAR (error); + addr = NULL; retval = FALSE; if (!_dbus_string_init (&full_address)) @@ -427,8 +429,6 @@ process_config_every_time (BusContext *context, link = _dbus_list_get_last_link (&context->servers); while (link != NULL) { - char *addr; - addr = dbus_server_get_address (link->data); if (addr == NULL) { @@ -452,6 +452,7 @@ process_config_every_time (BusContext *context, } dbus_free (addr); + addr = NULL; link = _dbus_list_get_prev_link (&context->servers, link); } @@ -489,6 +490,10 @@ process_config_every_time (BusContext *context, failed: _dbus_string_free (&full_address); + + if (addr) + dbus_free (addr) + return retval; } |