diff options
author | Christopher Ferris <cferris@google.com> | 2019-03-02 19:11:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-02 19:11:22 +0000 |
commit | b8ef55a4f841cb1e790e97776ee51419ec5d9bd1 (patch) | |
tree | 66d2980a1b04626c7e4fc1437e96194b958ea8f8 /libc/malloc_debug/malloc_debug.cpp | |
parent | 0771b752f1b955e7ded6ccbbf825b0ae93439eb5 (diff) | |
parent | a22f5d5175df5c42ec86d2c2db250edf1f64084c (diff) |
Merge "Make aligned_alloc match the standard."
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
-rw-r--r-- | libc/malloc_debug/malloc_debug.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp index 2e6afff55..f66295706 100644 --- a/libc/malloc_debug/malloc_debug.cpp +++ b/libc/malloc_debug/malloc_debug.cpp @@ -729,7 +729,7 @@ void* debug_aligned_alloc(size_t alignment, size_t size) { if (DebugCallsDisabled()) { return g_dispatch->aligned_alloc(alignment, size); } - if (!powerof2(alignment)) { + if (!powerof2(alignment) || (size % alignment) != 0) { errno = EINVAL; return nullptr; } |