[core] Fix tiny leak in pattern code when parse errors happen
This commit is contained in:
parent
81236d35bf
commit
ce4f9391e3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue