mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
Fixed cold page cache leak
The empty_pages pointer wasn't being propagated into the ->next pointer when more empty_pages were to be stored
This commit is contained in:
parent
ed91d884d3
commit
1e998a4349
@ -282,10 +282,13 @@ page_cleanup(void *_ UNUSED)
|
||||
if (!empty_pages || (empty_pages->pos == EP_POS_MAX))
|
||||
{
|
||||
/* There is either no pointer block or the last block is full. We use this block as a pointer block. */
|
||||
empty_pages = (struct empty_pages *) fp;
|
||||
UNPROTECT_PAGE(empty_pages);
|
||||
*empty_pages = (struct empty_pages) {};
|
||||
PROTECT_PAGE(empty_pages);
|
||||
struct empty_pages *ep = (struct empty_pages *) fp;
|
||||
UNPROTECT_PAGE(ep);
|
||||
*ep = (struct empty_pages) {
|
||||
.next = empty_pages,
|
||||
};
|
||||
PROTECT_PAGE(ep);
|
||||
empty_pages = ep;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user