]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: set the correct generation ID in pat_ref_append().
authorMaxime Henrion <mhenrion@haproxy.com>
Tue, 30 Dec 2025 18:58:56 +0000 (13:58 -0500)
committerOlivier Houchard <cognet@Oliviers-MacBook-Pro.local>
Tue, 30 Dec 2025 23:29:47 +0000 (00:29 +0100)
This fixes crashes when creating more than one new revision of a map or
acl file and purging the previous version.

src/pattern.c

index 1aecfde3b1cd07592887447f63d5b3fc9f5f2199..ef6e8c2cf85b49c09a1af3ba437ebe295f1d3dab 100644 (file)
@@ -2052,7 +2052,7 @@ struct pat_ref_elt *pat_ref_append(struct pat_ref *ref, unsigned int gen_id,
                        goto fail;
        }
 
-       elt->gen_id = ref->curr_gen;
+       elt->gen_id = gen_id;
        elt->line = line;
 
        memcpy((char*)elt->pattern, pattern, len + 1);