mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 21:31:32 +03:00
vere: safely free panc even if not in queue yet
There might be cases where we have created a panc, but have not inserted it into the linked list yet. Instead of asserting we have inserted it, simply conditionally update the head of the list.
This commit is contained in:
parent
349d567549
commit
fd6f24ce04
@ -188,9 +188,8 @@ _ames_panc_free(u3_panc* pac_u)
|
|||||||
if ( 0 != pac_u->pre_u ) {
|
if ( 0 != pac_u->pre_u ) {
|
||||||
pac_u->pre_u->nex_u = pac_u->nex_u;
|
pac_u->pre_u->nex_u = pac_u->nex_u;
|
||||||
}
|
}
|
||||||
else {
|
else if ( pan_u == pan_u->pac_u->sam_u->pan_u ) {
|
||||||
c3_assert(pac_u == pac_u->sam_u->pac_u);
|
pan_u->pac_u->sam_u->pan_u = pan_u->nex_u;
|
||||||
pac_u->sam_u->pac_u = pac_u->nex_u;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c3_free(pac_u->ptr_v);
|
c3_free(pac_u->ptr_v);
|
||||||
|
Loading…
Reference in New Issue
Block a user