Call check_that_malloc_is_allowed() in aligned_realloc()

This commit is contained in:
Florian Richer 2022-09-05 09:11:08 +02:00 committed by Rasmus Munk Larsen
parent 6e83e906c2
commit b7e21d4e38

View File

@ -229,6 +229,11 @@ inline void* aligned_realloc(void *ptr, std::size_t new_size, std::size_t old_si
if (!result && new_size)
throw_std_bad_alloc();
#ifdef EIGEN_RUNTIME_NO_MALLOC
if (result != ptr)
check_that_malloc_is_allowed();
#endif
return result;
}