[core] Fix tiny memleak with regex conditions and remove left-over HAVE_PCRE_H check

personal/stbuehler/wip
Thomas Porzelt 14 years ago
parent 426ee0bff0
commit 0347a26b37
  1. 3
      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) {

Loading…
Cancel
Save