[libgovirt] collection: unref the resource instead of the resources table
- From: Fabiano Fidêncio <ffidencio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] collection: unref the resource instead of the resources table
- Date: Thu, 22 Oct 2015 12:59:15 +0000 (UTC)
commit 7b48a957f733704f7dddd3b682111675e989666c
Author: Fabiano Fidêncio <fidencio redhat com>
Date: Thu Oct 22 14:40:37 2015 +0200
collection: unref the resource instead of the resources table
The typo was causing crashes, see the gdb backtrace:
#0 g_type_check_instance_is_fundamentally_a (
type_instance=type_instance entry=0x519b9e0,
fundamental_type=fundamental_type entry=80) at ../../gobject/gtype.c:3981
#1 0x63c4a47b in g_object_unref (_object=0x519b9e0)
at ../../gobject/gobject.c:3067
#2 0x64842fb0 in ovirt_collection_refresh_from_xml (collection=0x50d4450,
root_node=<optimized out>, error=0x28fb8c)
at ../../govirt/ovirt-collection.c:276
#3 0x64843c49 in get_collection_xml_async_cb (proxy=0x3aebfd0,
call=0x50d28a0, user_data=0x29c2ce0, error=0x28fb8c)
at ../../govirt/ovirt-proxy.c:343
#4 0x64843bb2 in call_async_cb (call=0x50d28a0, error=0x0, weak_object=0x0,
user_data=0x50d8680) at ../../govirt/ovirt-proxy.c:248
#5 0x00023fa7 in ?? ()
from C:\Program Files (x86)\VirtViewer v2.0-80\bin\librest-0.7-0.dll
#6 0x051600e0 in ?? ()
Resolves: rhbz#1273977
govirt/ovirt-collection.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/govirt/ovirt-collection.c b/govirt/ovirt-collection.c
index 36bdcf8..3bbdffe 100644
--- a/govirt/ovirt-collection.c
+++ b/govirt/ovirt-collection.c
@@ -292,7 +292,7 @@ ovirt_collection_refresh_from_xml(OvirtCollection *collection,
if (g_hash_table_lookup(resources, name) != NULL) {
g_message("'%s' resource with the same name ('%s') already exists",
collection->priv->resource_xml_name, name);
- g_object_unref(resources);
+ g_object_unref(G_OBJECT(resource));
continue;
}
g_hash_table_insert(resources, name, resource);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]