From 4a30ba5ca4072e85e42e84547572e958871952a2 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 23 Jul 2013 23:40:26 -0400 Subject: [PATCH] remove redundant check in memalign the case where mem was already aligned is handled earlier in the function now. --- src/malloc/memalign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/malloc/memalign.c b/src/malloc/memalign.c index cb232476..006bd21c 100644 --- a/src/malloc/memalign.c +++ b/src/malloc/memalign.c @@ -50,7 +50,7 @@ void *__memalign(size_t align, size_t len) ((size_t *)new)[-1] = header&7 | end-new; ((size_t *)end)[-2] = footer&7 | end-new; - if (new != mem) free(mem); + free(mem); return new; } -- 2.25.1