aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-04-18 08:10:49 +0800
committerLars-Peter Clausen <lars@metafoo.de>2009-04-21 16:42:13 +0800
commitad9fe17b0f8e23aabb5a05f73ee95e05db918399 (patch)
tree7e252949bac038019e77ae5d27934f4db42bd40a /src
parentddae3ae13b1bf6368bd91327357e3c6999ac6a45 (diff)
downloadgsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar.gz
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar.bz2
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar.lz
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar.xz
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.tar.zst
gsoc2013-empathy-ad9fe17b0f8e23aabb5a05f73ee95e05db918399.zip
fix memleak in preferences_widget_sync_string_combo. Previously name was not
freed if it was a match.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-preferences.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index dba87b4df..14bf54a12 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2003-2007 Imendio AB
*
@@ -696,9 +696,9 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget)
found = FALSE;
if (value && gtk_tree_model_get_iter_first (model, &iter)) {
- gchar *name;
do {
+ gchar *name;
gtk_tree_model_get (model, &iter,
COL_COMBO_NAME, &name,
-1);
@@ -706,13 +706,10 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget)
if (strcmp (name, value) == 0) {
found = TRUE;
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &iter);
- break;
- } else {
- found = FALSE;
}
g_free (name);
- } while (gtk_tree_model_iter_next (model, &iter));
+ } while (!found && gtk_tree_model_iter_next (model, &iter));
}
/* Fallback to the first one. */