From 0347a26b370490aabe03b907b79a650705e75676 Mon Sep 17 00:00:00 2001 From: Thomas Porzelt Date: Fri, 5 Jun 2009 22:03:25 +0200 Subject: [PATCH] [core] Fix tiny memleak with regex conditions and remove left-over HAVE_PCRE_H check --- src/condition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/condition.c b/src/condition.c index d9c5d6e..3791a94 100644 --- a/src/condition.c +++ b/src/condition.c @@ -84,7 +84,6 @@ static condition* cond_new_string(comp_operator_t op, condition_lvalue *lvalue, return c; } -#ifdef HAVE_PCRE_H /* only MATCH and NOMATCH */ static condition* cond_new_match(server *srv, comp_operator_t op, condition_lvalue *lvalue, GString *str) { condition *c; @@ -103,10 +102,10 @@ static condition* cond_new_match(server *srv, comp_operator_t op, condition_lval c->rvalue.type = COND_VALUE_REGEXP; c->rvalue.regex = regex; + g_string_free(str, TRUE); return c; } -#endif /* only IP and NOTIP */ static condition* cond_new_ip(server *srv, comp_operator_t op, condition_lvalue *lvalue, GString *str) {