]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: pattern: error message missing
authorThierry FOURNIER <tfournier@exceliance.fr>
Fri, 6 Feb 2015 16:50:55 +0000 (17:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 Feb 2015 17:04:27 +0000 (18:04 +0100)
This patch must be backported in 1.5 version.

src/pattern.c

index 208e33a448bdde27bdb64813b43f271b4da345bc..a6fc52d612ffb684d34ded69c07895cf1ee79c78 100644 (file)
@@ -989,8 +989,10 @@ int pat_idx_list_ptr(struct pattern_expr *expr, struct pattern *pat, char **err)
 
        /* allocate pattern */
        patl = calloc(1, sizeof(*patl));
-       if (!patl)
+       if (!patl) {
+               memprintf(err, "out of memory while indexing pattern");
                return 0;
+       }
 
        /* duplicate pattern */
        memcpy(&patl->pat, pat, sizeof(*pat));