summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-10-22 14:40:37 +0200
committerFabiano FidĂȘncio <fidencio@redhat.com>2015-10-22 14:40:37 +0200
commit7b48a957f733704f7dddd3b682111675e989666c (patch)
treeaf5b62a4b570d60723ae0121d3e71576cc780c66
parenta15d46b030398c2133a9718257e6b37d50c93617 (diff)
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
-rw-r--r--govirt/ovirt-collection.c2
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);