diff options
author | Ted Gould <ted@gould.cx> | 2010-11-18 14:41:27 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-11-18 14:41:27 -0600 |
commit | c40c70c6cee475ab2bf8d7e6e5804571b25deb9c (patch) | |
tree | 1e43a90e9773876c2e24288c7456b1ef941efa20 | |
parent | fc235b7eb4e7102b349fb711991e5c121a1c7a7d (diff) | |
download | libdbusmenu-c40c70c6cee475ab2bf8d7e6e5804571b25deb9c.tar.gz libdbusmenu-c40c70c6cee475ab2bf8d7e6e5804571b25deb9c.tar.bz2 libdbusmenu-c40c70c6cee475ab2bf8d7e6e5804571b25deb9c.zip |
Protect against NULL params (which they should be) but not leak just in case
-rw-r--r-- | libdbusmenu-glib/client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 0479548..cb3377a 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1206,10 +1206,12 @@ menuitem_call_cb (GObject * proxy, GAsyncResult * res, gpointer userdata) g_object_unref(edata->menuitem); g_free(edata); - if (error != NULL) { + if (G_UNLIKELY(error != NULL)) { g_error_free(error); } - g_variant_unref(params); + if (G_LIKELY(params != NULL)) { + g_variant_unref(params); + } return; } |