diff options
author | Stefan Walter <stefw@src.gnome.org> | 2007-12-18 17:59:24 +0000 |
---|---|---|
committer | Stefan Walter <stefw@src.gnome.org> | 2007-12-18 17:59:24 +0000 |
commit | ccd4e20c56163fcc99acc367194301f602567e29 (patch) | |
tree | 15145877c99535266a2b61fec1db9ad586aca441 | |
parent | 79c4e28524f837106420c7b6ac286a79511a0710 (diff) | |
download | gnome-keyring-ccd4e20c56163fcc99acc367194301f602567e29.tar.gz |
Initialize Dbus error structure properly. Fixes crash on shutdown. Patch
* gkr-location.c: Initialize Dbus error structure properly.
Fixes crash on shutdown. Patch by Jeff Cai. Fixes bug #504239
svn path=/branches/gnome-2-20/; revision=970
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | common/gkr-location.c | 8 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-12-18 Stef Walter <stef@memberwebs.com> + + * gkr-location.c: Initialize Dbus error structure properly. + Fixes crash on shutdown. Patch by Jeff Cai. Fixes bug #504239 + 2007-12-03 Stef Walter <stef@memberwebs.com> * common/gkr-secure-memory.c: Add header necessary for diff --git a/common/gkr-location.c b/common/gkr-location.c index c3eee98c..4a5a428e 100644 --- a/common/gkr-location.c +++ b/common/gkr-location.c @@ -386,9 +386,13 @@ location_manager_hal_uninit (GkrLocationManager *locmgr) DBusError error; if (pv->hal_ctx) { - if (!libhal_ctx_shutdown (pv->hal_ctx, &error)) + dbus_error_init (&error); + if (!libhal_ctx_shutdown (pv->hal_ctx, &error)) { g_warning ("failed to shutdown HAL context: %s\n", error.message); - else if (!libhal_ctx_free (pv->hal_ctx)) + dbus_error_free (&error); + } + + if (!libhal_ctx_free (pv->hal_ctx)) g_warning ("failed to free HAL context"); pv->hal_ctx = NULL; } |