2
0
Fork 0

[core] Fix tiny leak in pattern code when parse errors happen

personal/stbuehler/wip
Thomas Porzelt 2010-09-25 23:43:54 +02:00
parent 81236d35bf
commit ce4f9391e3
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ liPattern *li_pattern_new(liServer *srv, const gchar* str) {
if (*c != '}') {
/* parse error */
ERROR(srv, "could not parse pattern: \"%s\"", str);
if (key)
g_string_free(key, TRUE);
li_pattern_free((liPattern*)pattern);
return NULL;
}