Commit 40089da1 authored by unknown's avatar unknown

backport valgrind cleanups from 6.0-engines


mysql-test/valgrind.supp:
  silence valgrind warning of memory leak in dlopen
strings/strmake.c:
  silence valgrind warning cause by strlen examining unset bytes.
parent 53fe1435
......@@ -495,3 +495,16 @@
fun:_db_enter_
fun:kill_server
}
#
# Warning caused by small memory leak in threaded dlopen
#
{
dlopen threaded memory leak
Memcheck:Leak
fun:calloc
obj:*/libdl-*.so
fun:dlopen*
}
......@@ -41,9 +41,9 @@ char *strmake(register char *dst, register const char *src, size_t length)
write a character rather than '\0' as this makes spotting these
problems in the results easier.
*/
uint n= strlen(src) + 1;
if (n <= length)
memset(dst + n, (int) 'Z', length - n + 1);
uint n= 0;
while (n < length && src[n++]);
memset(dst + n, (int) 'Z', length - n + 1);
#endif
while (length--)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment