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/desktop-file.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/desktop-file.c')
-rw-r--r-- | bus/desktop-file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bus/desktop-file.c b/bus/desktop-file.c index fc985122..7a96a44c 100644 --- a/bus/desktop-file.c +++ b/bus/desktop-file.c @@ -525,12 +525,14 @@ parse_key_value (BusDesktopFileParser *parser, DBusError *error) line = new_line (parser); if (line == NULL) { + dbus_free (value); parser_free (parser); return FALSE; } if (!_dbus_string_init (&key)) { + dbus_free (value); parser_free (parser); return FALSE; } @@ -538,12 +540,14 @@ parse_key_value (BusDesktopFileParser *parser, DBusError *error) if (!_dbus_string_copy_len (&parser->data, key_start, key_end - key_start, &key, 0)) { + dbus_free (value); parser_free (parser); return FALSE; } if (!_dbus_string_steal_data (&key, &tmp)) { + dbus_free (value); parser_free (parser); return FALSE; } |