Fix null-pointer dereference

* In the corner case where we don't know about a collection/item
   but receive the CollectionChanged or ItemChanged signal,
   fix use of a null pointer
This commit is contained in:
Stef Walter 2012-06-27 16:38:35 +02:00
parent 9b9db3fb51
commit 258ef1b8b8
2 changed files with 8 additions and 4 deletions

View File

@ -507,9 +507,11 @@ secret_collection_signal (GDBusProxy *proxy,
g_mutex_unlock (&self->pv->mutex);
if (item) {
secret_item_refresh (item);
g_object_unref (item);
}
}
g_variant_unref (paths);
}

View File

@ -403,9 +403,11 @@ secret_service_signal (GDBusProxy *proxy,
g_mutex_unlock (&self->pv->mutex);
if (collection) {
secret_collection_refresh (collection);
g_object_unref (collection);
}
}
g_variant_unref (paths);
}