projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70a92bc
)
remove redundant check in memalign
author
Rich Felker
<dalias@aerifal.cx>
Wed, 24 Jul 2013 03:40:26 +0000
(23:40 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 24 Jul 2013 03:40:26 +0000
(23:40 -0400)
the case where mem was already aligned is handled earlier in the
function now.
src/malloc/memalign.c
patch
|
blob
|
history
diff --git
a/src/malloc/memalign.c
b/src/malloc/memalign.c
index
cb23247
..
006bd21
100644
(file)
--- 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;
((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;
}
return new;
}