From ce4f9391e35ac2534b1da71db1ee8b138af0e4e5 Mon Sep 17 00:00:00 2001 From: Thomas Porzelt Date: Sat, 25 Sep 2010 23:43:54 +0200 Subject: [PATCH] [core] Fix tiny leak in pattern code when parse errors happen --- src/main/pattern.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/pattern.c b/src/main/pattern.c index a654144..ef70334 100644 --- a/src/main/pattern.c +++ b/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; }