Reallocate but free `p` on errors
| 417 | |
| 418 | // Reallocate but free `p` on errors |
| 419 | static void* mi_theap_reallocf(mi_theap_t* theap, void* p, size_t newsize) mi_attr_noexcept { |
| 420 | void* newp = mi_theap_realloc(theap, p, newsize); |
| 421 | if (newp==NULL && p!=NULL) mi_free(p); |
| 422 | return newp; |
| 423 | } |
| 424 | |
| 425 | static void* mi_theap_rezalloc(mi_theap_t* theap, void* p, size_t newsize) mi_attr_noexcept { |
| 426 | return _mi_theap_realloc_zero(theap, p, newsize, true, NULL, NULL); |
no test coverage detected