engine: net_chan: fix Netchan_AddBufferToList leaking pointer

This commit is contained in:
Alibek Omarov
2026-04-19 20:43:32 +05:00
parent 96e88adfcd
commit 897fb98b93

View File

@@ -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;
}