From a4706fa56c6258a2774595b390d79c2ebc4935d4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 1 Jun 2010 06:25:58 +0000 Subject: Fixed memory leaks from bug #3007669. --- gtk/PlatGTK.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 9e84815e2..d632b9aa6 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -2245,8 +2245,10 @@ int ListBoxX::Find(const char *prefix) { gchar *s; gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1); if (s && (0 == strncmp(prefix, s, strlen(prefix)))) { + g_free(s); return i; } + g_free(s); valid = gtk_tree_model_iter_next(model, &iter) != FALSE; i++; } @@ -2267,6 +2269,7 @@ void ListBoxX::GetValue(int n, char *value, int len) { } else { value[0] = '\0'; } + g_free(text); } // g_return_if_fail causes unnecessary compiler warning in release compile. -- cgit v1.2.3