Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-23 08:24:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-23 08:24:57 +0300
commit103a31f712649ab901d9508f5ae1a2319fde60b4 (patch)
tree5d9d822db3c97c4c9118a56b0f579ea0f60531fe
parent3ada840e65fd91564a2f2f832e815416234aa4e7 (diff)
Fix incorrect size in aligned lockfree realloc
Thanks to @alikendarfen for finding.
-rw-r--r--intern/guardedalloc/intern/mallocn_lockfree_impl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/intern/guardedalloc/intern/mallocn_lockfree_impl.c b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
index 9575375d90a..d01ad6c8d72 100644
--- a/intern/guardedalloc/intern/mallocn_lockfree_impl.c
+++ b/intern/guardedalloc/intern/mallocn_lockfree_impl.c
@@ -204,9 +204,9 @@ void *MEM_lockfree_reallocN_id(void *vmemh, size_t len, const char *str)
else {
MemHeadAligned *memh_aligned = MEMHEAD_ALIGNED_FROM_PTR(vmemh);
newp = MEM_lockfree_mallocN_aligned(
- old_len,
- (size_t)memh_aligned->alignment,
- "realloc");
+ len,
+ (size_t)memh_aligned->alignment,
+ "realloc");
}
if (newp) {
@@ -242,9 +242,10 @@ void *MEM_lockfree_recallocN_id(void *vmemh, size_t len, const char *str)
}
else {
MemHeadAligned *memh_aligned = MEMHEAD_ALIGNED_FROM_PTR(vmemh);
- newp = MEM_lockfree_mallocN_aligned(old_len,
- (size_t)memh_aligned->alignment,
- "recalloc");
+ newp = MEM_lockfree_mallocN_aligned(
+ len,
+ (size_t)memh_aligned->alignment,
+ "recalloc");
}
if (newp) {