mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
match.c: fix g_utf8_casefold() memory leak
Reported-by: @jlindgren90
This commit is contained in:
parent
d609c9e3f9
commit
731b1b66eb
1 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,11 @@
|
||||||
bool
|
bool
|
||||||
match_glob(const gchar *pattern, const gchar *string)
|
match_glob(const gchar *pattern, const gchar *string)
|
||||||
{
|
{
|
||||||
return g_pattern_match_simple(g_utf8_casefold(pattern, -1), g_utf8_casefold(string, -1));
|
gchar *p = g_utf8_casefold(pattern, -1);
|
||||||
|
gchar *s = g_utf8_casefold(string, -1);
|
||||||
|
bool ret = g_pattern_match_simple(p, s);
|
||||||
|
g_free(p);
|
||||||
|
g_free(s);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue