Remove freed refcount from any list it's part of.

This commit is contained in:
Danila Fedorin 2018-08-11 01:42:30 -07:00
parent 9eae28928a
commit f257d0b2de

View File

@ -29,6 +29,8 @@ void _libab_ref_changed(libab_ref* ref) {
}
}
if (ref->count->weak == 0) {
if(ref->count->prev) ref->count->prev->next = ref->count->next;
if(ref->count->next) ref->count->next->prev = ref->count->prev;
free(ref->count);
}
}