[libgovirt] Don't leak old OvirtCdrom::file value when setting it
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Don't leak old OvirtCdrom::file value when setting it
- Date: Wed, 16 Apr 2014 16:21:21 +0000 (UTC)
commit ff4e9aefaaeece7fc5aaffb08bcc6348c3ac15df
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Apr 16 18:18:30 2014 +0200
Don't leak old OvirtCdrom::file value when setting it
Leak reported by valgrind
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 31ded13..16ee833 100644
--- a/govirt/ovirt-cdrom.c
+++ b/govirt/ovirt-cdrom.c
@@ -70,6 +70,7 @@ static void ovirt_cdrom_set_property(GObject *object,
switch (prop_id) {
case PROP_FILE:
+ g_free(cdrom->priv->file);
cdrom->priv->file = g_value_dup_string(value);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]