diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-04-13 15:28:54 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-04-13 15:37:49 +0200 |
commit | 4afb3ffdea45ab8d40aed7265ede1df59eb53de2 (patch) | |
tree | 40d13812443fa5cd294909ddd792dde37ba6f823 | |
parent | 08fe6295c1a638e255547e974409f44df5353457 (diff) |
collection: Fix leak on duplicate resource names
When a collection contains 2 resources with the same name, we were
correctly releasing the memory associated with the colliding resource,
but not its name.
-rw-r--r-- | govirt/ovirt-collection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/govirt/ovirt-collection.c b/govirt/ovirt-collection.c index 3bbdffe..a3b0f3f 100644 --- a/govirt/ovirt-collection.c +++ b/govirt/ovirt-collection.c @@ -293,6 +293,7 @@ ovirt_collection_refresh_from_xml(OvirtCollection *collection, g_message("'%s' resource with the same name ('%s') already exists", collection->priv->resource_xml_name, name); g_object_unref(G_OBJECT(resource)); + g_free(name); continue; } g_hash_table_insert(resources, name, resource); |