This commit is contained in:
Olliver Schinagl 2024-05-18 17:11:04 +00:00 committed by GitHub
commit ace380eb38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,8 @@ void __attribute__((alloc_size(2))) *FTLrealloc(void *ptr_in, const size_t size,
{
errno = 0;
ptr_out = realloc(ptr_in, size);
if(ptr_out != NULL)
ptr_in = NULL;
}
// Try again to allocate memory if this failed due to an interruption by
// an incoming signal

View File

@ -340,6 +340,7 @@ xrealloc_impl(void *ptr, size_t new_size, const char *file, int line,
new_ptr = realloc(ptr, new_size);
if (new_ptr != NULL)
{
ptr = NULL;
hash_table_del(xmalloc_table, ptr);
hash_table_add(xmalloc_table, new_ptr, (int)new_size, file, line, func);
}