Add a missing prof_alloc_rollback() call.
In the case where prof_alloc_prep() is called with an over-estimate of allocation size, and sampling doesn't end up being triggered, the tctx must be discarded.
This commit is contained in:
parent
a7fdcc8b09
commit
20cd2de5ef
@ -513,6 +513,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
|
|||||||
* though its actual usize was insufficient to cross the
|
* though its actual usize was insufficient to cross the
|
||||||
* sample threshold.
|
* sample threshold.
|
||||||
*/
|
*/
|
||||||
|
prof_alloc_rollback(tsd, tctx, true);
|
||||||
tctx = (prof_tctx_t *)(uintptr_t)1U;
|
tctx = (prof_tctx_t *)(uintptr_t)1U;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user