From 897fb98b9390e268866abeb7f45338bbaa00a60d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 19 Apr 2026 20:43:32 +0500 Subject: [PATCH] engine: net_chan: fix Netchan_AddBufferToList leaking pointer --- engine/common/net_chan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index 18347c20..361085e7 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -617,7 +617,10 @@ void Netchan_AddBufferToList( fragbuf_t **pplist, fragbuf_t *pbuf ) if( id1 > id2 ) { // insert here - pbuf->next = n->next; + // pbuf->next = n->next; + + // a1ba: this seems to be incorrect insertion, as `n` gets removed from list and effectively leaked + pbuf->next = n; pprev->next = pbuf; return; }