Backport list box memory leak fixes from Scintilla 2.20.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5201 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
87ddff9707
commit
3d21fde5df
@ -9,6 +9,8 @@
|
|||||||
regex support is required.
|
regex support is required.
|
||||||
* tagmanager/make.c:
|
* tagmanager/make.c:
|
||||||
Backport fix for possible infinite loop from CTags.
|
Backport fix for possible infinite loop from CTags.
|
||||||
|
* scintilla/PlatGTK.cxx:
|
||||||
|
Backport list box memory leak fixes from Scintilla 2.20.
|
||||||
|
|
||||||
|
|
||||||
2010-08-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2010-08-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
@ -2245,8 +2245,10 @@ int ListBoxX::Find(const char *prefix) {
|
|||||||
gchar *s;
|
gchar *s;
|
||||||
gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1);
|
gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1);
|
||||||
if (s && (0 == strncmp(prefix, s, strlen(prefix)))) {
|
if (s && (0 == strncmp(prefix, s, strlen(prefix)))) {
|
||||||
|
g_free(s);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
g_free(s);
|
||||||
valid = gtk_tree_model_iter_next(model, &iter) != FALSE;
|
valid = gtk_tree_model_iter_next(model, &iter) != FALSE;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -2267,6 +2269,7 @@ void ListBoxX::GetValue(int n, char *value, int len) {
|
|||||||
} else {
|
} else {
|
||||||
value[0] = '\0';
|
value[0] = '\0';
|
||||||
}
|
}
|
||||||
|
g_free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// g_return_if_fail causes unnecessary compiler warning in release compile.
|
// g_return_if_fail causes unnecessary compiler warning in release compile.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user