mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 17:25:31 +02:00
Fix accesses to uninitialized memory (found by valgrind)
mysys/my_alloc.c: Added comment for free_root sql/filesort.cc: Removed valgrind warning sql/sql_select.cc: Remove not needed my_casedn_str() for internal files (Old code actually didn't do any god as it was accessing not used memory) sql/sql_view.cc: Removed access to uninitialized memory sql/table.cc: Cleanup of error handling
This commit is contained in:
parent
a21bb57546
commit
90b9065dce
5 changed files with 71 additions and 54 deletions
|
|
@ -245,6 +245,19 @@ static inline void mark_blocks_free(MEM_ROOT* root)
|
|||
/*
|
||||
Deallocate everything used by alloc_root or just move
|
||||
used blocks to free list if called with MY_USED_TO_FREE
|
||||
|
||||
SYNOPSIS
|
||||
free_root()
|
||||
root Memory root
|
||||
MyFlags Flags for what should be freed:
|
||||
|
||||
MY_MARK_BLOCKS_FREED Don't free blocks, just mark them free
|
||||
MY_KEEP_PREALLOC If this is not set, then free also the
|
||||
preallocated block
|
||||
|
||||
NOTES
|
||||
One can call this function either with root block initialised with
|
||||
init_alloc_root() or with a bzero()-ed block.
|
||||
*/
|
||||
|
||||
void free_root(MEM_ROOT *root, myf MyFlags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue