diff options
-rw-r--r-- | src/basic/alloc-util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/basic/alloc-util.c b/src/basic/alloc-util.c index 1e4ee722f2..f4bd33f4e0 100644 --- a/src/basic/alloc-util.c +++ b/src/basic/alloc-util.c @@ -1,6 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -#include <malloc.h> #include <stdint.h> #include <string.h> @@ -65,7 +64,7 @@ void* greedy_realloc(void **p, size_t *allocated, size_t need, size_t size) { return NULL; *p = q; - *allocated = _unlikely_(size == 0) ? newalloc : malloc_usable_size(q) / size; + *allocated = newalloc; return q; } |