BUG/MINOR: acl: fix a double free during exit when using PCRE_JIT

When freeing ACL regex, we don't want to perform the free() in regex_free()
as it's already performed in free_pattern(). The double free only happens
when using PCRE_JIT when freeing everything during exit so it's harmless
but exhibits libc errors during a reload/restart.

Bug reported by Seri.
This commit is contained in:
Willy Tarreau 2013-05-08 18:09:54 +02:00
parent 7c41a1b59b
commit dd11293e84

View File

@ -79,7 +79,6 @@ static inline void regex_free(regex *preg) {
#ifdef USE_PCRE_JIT
pcre_free_study(preg->extra);
pcre_free(preg->reg);
free(preg);
#else
regfree(preg);
#endif