packages/net/haproxy/patches/0012-BUG-MINOR-map-correctly-track-reference-to-the-last-ref_elt-being-dumped.patch
Christian Lachner 842901b4b1 haproxy: Update all patches for HAProxy v1.8.8
- Add new patches (see https://www.haproxy.org/bugs/bugs-1.8.8.html)
- Raise patch-level to 03

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2018-05-10 20:37:15 +02:00

31 lines
1.1 KiB
Diff

commit b2219ae216a141acdf0e2a3f67d2c85aee2a2bc2
Author: Dragan Dosen <ddosen@haproxy.com>
Date: Fri May 4 16:27:15 2018 +0200
BUG/MINOR: map: correctly track reference to the last ref_elt being dumped
The bug was introduced in the commit 8d85aa4 ("BUG/MAJOR: map: fix
segfault during 'show map/acl' on cli").
This patch should be backported to 1.8, 1.7 and 1.6.
(cherry picked from commit 336a11f75571ad46f74a7c6247c13ed44f95da93)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/map.c b/src/map.c
index f40e4394..a9a1e53c 100644
--- a/src/map.c
+++ b/src/map.c
@@ -307,9 +307,9 @@ static int cli_io_handler_pat_list(struct appctx *appctx)
* reference to the last ref_elt being dumped.
*/
if (appctx->st2 == STAT_ST_LIST) {
- if (!LIST_ISEMPTY(&appctx->ctx.sess.bref.users)) {
- LIST_DEL(&appctx->ctx.sess.bref.users);
- LIST_INIT(&appctx->ctx.sess.bref.users);
+ if (!LIST_ISEMPTY(&appctx->ctx.map.bref.users)) {
+ LIST_DEL(&appctx->ctx.map.bref.users);
+ LIST_INIT(&appctx->ctx.map.bref.users);
}
}
return 1;