[nautilus-ideviceinfo/gtk3] Make sure to not mix free/g_free
- From: Martin Szulecki <mszulecki src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-ideviceinfo/gtk3] Make sure to not mix free/g_free
- Date: Wed, 24 Dec 2014 15:42:57 +0000 (UTC)
commit 9bac0b08903f6b871d6b0762e2674e46f7d3650a
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Dec 11 15:37:06 2014 +0100
Make sure to not mix free/g_free
In theory, they may not be using different allocator implementations.
src/ideviceinfo-property-page.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/ideviceinfo-property-page.c b/src/ideviceinfo-property-page.c
index 2316a97..039bfe3 100644
--- a/src/ideviceinfo-property-page.c
+++ b/src/ideviceinfo-property-page.c
@@ -280,7 +280,10 @@ update_ui (CompletedMessage *msg)
plist_dict_get_item(dict, "MarketingName");
if (node) {
- plist_get_string_val(node, &val);
+ char *tmp;
+ plist_get_string_val(node, &tmp);
+ val = g_strdup(tmp);
+ free(tmp);
} else {
val = g_strdup(devtype);
}
@@ -304,7 +307,7 @@ update_ui (CompletedMessage *msg)
gtk_label_set_text(lbDeviceModel, val);
}
if (val) {
- free(val);
+ g_free(val);
}
val = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]