mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
When cloning a rte and replacing its rta, remember to free the old one
so that we don't leak memory. Thanks go to the resource tracking system for quickly discovering the source of leakages.
This commit is contained in:
parent
7722938d63
commit
f7667ba1c4
@ -215,6 +215,7 @@ rta_cow(void)
|
||||
memcpy(f_rta_copy, (*f_rte)->attrs, sizeof(rta));
|
||||
f_rta_copy->aflags = 0;
|
||||
*f_rte = rte_cow(*f_rte);
|
||||
rta_free((*f_rte)->attrs);
|
||||
(*f_rte)->attrs = f_rta_copy;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user