From: Olivier Houchard Date: Tue, 10 Mar 2020 16:39:21 +0000 (+0100) Subject: BUG/MINOR: buffers: MT_LIST_DEL_SAFE() expects the temporary pointer. X-Git-Tag: v2.2-dev5~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c96fc166c314da2fdae26b5080a506bec25b29c;p=thirdparty%2Fhaproxy.git BUG/MINOR: buffers: MT_LIST_DEL_SAFE() expects the temporary pointer. When calling MT_LIST_DEL_SAFE(), give him the temporary pointer "tmpelt", as that's what is expected. We want to be able to set that pointer to NULL, to let other parts of the code know we deleted an element. --- diff --git a/src/buffer.c b/src/buffer.c index 9c1c9b4842..a7f405bbc3 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -120,7 +120,7 @@ void __offer_buffer(void *from, unsigned int threshold) if (wait->target == from || !wait->wakeup_cb(wait->target)) continue; - MT_LIST_DEL_SAFE(&wait->list); + MT_LIST_DEL_SAFE(elt1); avail--; } }