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

personal/stbuehler/wip
Thomas Porzelt 12 years ago
parent 81236d35bf
commit ce4f9391e3
  1. 2
      src/main/pattern.c

@ -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…
Cancel
Save