mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
match.c: fix g_utf8_casefold() memory leak
Reported-by: @jlindgren90
This commit is contained in:
parent
d609c9e3f9
commit
bdd3849138
1 changed files with 6 additions and 1 deletions
|
|
@ -6,6 +6,11 @@
|
|||
bool
|
||||
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