mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-12-12 09:24:29 -05:00
remove useless code in the empty_slabs path
This commit is contained in:
parent
29df2429c2
commit
bb176e09bc
5
malloc.c
5
malloc.c
@ -304,12 +304,9 @@ static inline void *slab_allocate(size_t requested_size) {
|
||||
struct slab_metadata *metadata = c->empty_slabs;
|
||||
c->empty_slabs = c->empty_slabs->next;
|
||||
|
||||
metadata->next = c->partial_slabs;
|
||||
metadata->next = NULL;
|
||||
metadata->prev = NULL;
|
||||
|
||||
if (c->partial_slabs) {
|
||||
c->partial_slabs->prev = metadata;
|
||||
}
|
||||
c->partial_slabs = metadata;
|
||||
|
||||
void *slab = get_slab(c, slab_size, metadata);
|
||||
|
Loading…
Reference in New Issue
Block a user