[libgovirt] Fix leak in ovirt_cdrom_refresh_from_xml()
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Fix leak in ovirt_cdrom_refresh_from_xml()
- Date: Thu, 26 Jun 2014 23:22:15 +0000 (UTC)
commit cc712cac624181eac9dae28096e24cd083c48cfd
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu May 22 12:49:11 2014 +0200
Fix leak in ovirt_cdrom_refresh_from_xml()
The filename was leaked if it was already set before the refresh.
govirt/ovirt-cdrom.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-cdrom.c b/govirt/ovirt-cdrom.c
index 2b8d7a0..e842e10 100644
--- a/govirt/ovirt-cdrom.c
+++ b/govirt/ovirt-cdrom.c
@@ -101,6 +101,7 @@ static gboolean ovirt_cdrom_refresh_from_xml(OvirtCdrom *cdrom,
file_node = g_hash_table_lookup(node->children, file_key);
if (file_node != NULL) {
file = rest_xml_node_get_attr(file_node, "id");
+ g_free(cdrom->priv->file);
cdrom->priv->file = g_strdup(file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]