aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/PlatGTK.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-06-01 06:25:58 +0000
committernyamatongwe <devnull@localhost>2010-06-01 06:25:58 +0000
commit016e1b5a4906b00f67b125d24336881c7eac09ba (patch)
tree2305c9c532f55eab635f6cac0c686bc6a1a9a3d3 /gtk/PlatGTK.cxx
parent5c5078ce18c95e650483efdd53672ec05da9e71a (diff)
downloadscintilla-mirror-016e1b5a4906b00f67b125d24336881c7eac09ba.tar.gz
Fixed memory leaks from bug #3007669.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r--gtk/PlatGTK.cxx3
1 files changed, 3 insertions, 0 deletions
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.