summaryrefslogtreecommitdiff
path: root/src/malloc
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-07-23 23:40:26 -0400
committerRich Felker <dalias@aerifal.cx>2013-07-23 23:40:26 -0400
commit4a30ba5ca4072e85e42e84547572e958871952a2 (patch)
tree4c43a7f289177eb8c8dd6bd8dfafd66c4d828510 /src/malloc
parent70a92bc968156155dd578f7fb1d4c4e3fceb32f8 (diff)
downloadmusl-4a30ba5ca4072e85e42e84547572e958871952a2.tar.gz
musl-4a30ba5ca4072e85e42e84547572e958871952a2.tar.bz2
musl-4a30ba5ca4072e85e42e84547572e958871952a2.tar.xz
musl-4a30ba5ca4072e85e42e84547572e958871952a2.zip
remove redundant check in memalign
the case where mem was already aligned is handled earlier in the function now.
Diffstat (limited to 'src/malloc')
-rw-r--r--src/malloc/memalign.c2
1 files changed, 1 insertions, 1 deletions
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;
}