]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: acl: fix a double free during exit when using PCRE_JIT
authorWilly Tarreau <w@1wt.eu>
Wed, 8 May 2013 16:09:54 +0000 (18:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 May 2013 16:14:18 +0000 (18:14 +0200)
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.

include/common/regex.h

index bab1a55cc91a2ae8dfeddf98072fb2cd552c835b..01040195a1244196d54f2e3c4425ec4b3e3f42fd 100644 (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