Browse Source

fix mallocng regression in malloc_usable_size with null argument

commit d150764697 added support for null
argument in oldmalloc and was overlooked when switching to mallocng.
master
Dominic Chen 6 years ago
committed by Rich Felker
parent
commit
5d464f524b
  1. 1
      src/malloc/mallocng/malloc_usable_size.c

1
src/malloc/mallocng/malloc_usable_size.c

@ -3,6 +3,7 @@
size_t malloc_usable_size(void *p)
{
if (!p) return 0;
struct meta *g = get_meta(p);
int idx = get_slot_index(p);
size_t stride = get_stride(g);

Loading…
Cancel
Save