Fix test_memcheck malloc assert