Hi all,

Le 18/05/2014 00:10, Thomas Heil a écrit :
Ive tried with this patch
-b
Index: haproxy-1.5-dev25/src/cfgparse.c
===================================================================
--- haproxy-1.5-dev25.orig/src/cfgparse.c
+++ haproxy-1.5-dev25/src/cfgparse.c
@@ -1580,7 +1580,10 @@ static int create_cond_regex_rule(const

   err:
         free(errmsg);
-       free(preg);
+       if (preg) {
+               regfree(preg);
+               free(preg);
+       }
         return err_code;
  }

One thing is that I don't understand the initial patch provided by Dirkjan :
http://haproxy.1wt.eu/git?p=haproxy.git;a=commitdiff;h=07fcaaa4cd89002cb100644197752ea050f54bee;hp=e21f84903ef334c02f2783b20a128f381263e676#patch2

Why would we want to free the preg memory when no error occurs ?
I'm really not sure this fix is valid.

--
Cyril Bonté

Reply via email to