[gnome-disk-utility] Don't leak when sorting
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Don't leak when sorting
- Date: Wed, 21 Nov 2012 17:17:43 +0000 (UTC)
commit 5546aee171f37d690687d513d10065fa21877e2f
Author: David Zeuthen <zeuthen gmail com>
Date: Wed Nov 21 12:17:33 2012 -0500
Don't leak when sorting
Signed-off-by: David Zeuthen <zeuthen gmail com>
src/disks/gduwindow.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index f5171e4..0c13f11 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -1114,6 +1114,7 @@ device_sort_function (GtkTreeModel *model,
gpointer user_data)
{
gchar *sa, *sb;
+ gint ret;
gtk_tree_model_get (model, a,
GDU_DEVICE_TREE_MODEL_COLUMN_SORT_KEY, &sa,
@@ -1121,8 +1122,10 @@ device_sort_function (GtkTreeModel *model,
gtk_tree_model_get (model, b,
GDU_DEVICE_TREE_MODEL_COLUMN_SORT_KEY, &sb,
-1);
-
- return g_strcmp0 (sa, sb);
+ ret = g_strcmp0 (sa, sb);
+ g_free (sa);
+ g_free (sb);
+ return ret;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]