summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-21 14:41:11 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-21 14:41:11 +0300
commitacc97298e5605174b6891d6439555069f95089d9 (patch)
treecc6a057b378beb03666a7f62bfa4c9e722efae65 /mysys
parentd533f6d58b0e4e4dace14227c6eb53e3c0b3232d (diff)
parent948e888097b8ddc22167f2d61726adb0cdd88215 (diff)
downloadmariadb-git-acc97298e5605174b6891d6439555069f95089d9.tar.gz
Merge 5.5 into 10.0
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_alloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 05b6cac6733..4a60ab5415e 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -200,6 +200,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
uchar* point;
reg1 USED_MEM *next= 0;
reg2 USED_MEM **prev;
+ size_t original_length = length;
DBUG_ENTER("alloc_root");
DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
@@ -260,7 +261,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
mem_root->used= next;
mem_root->first_block_usage= 0;
}
- TRASH_ALLOC(point, length);
+ TRASH_ALLOC(point, original_length);
DBUG_PRINT("exit",("ptr: 0x%lx", (ulong) point));
DBUG_RETURN((void*) point);
#endif