mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-30 00:58:02 +03:00
Fix bug in prof_realloc
We should pass in `old_ptr` rather than the new `ptr` to `prof_free_sampled_object()` when `old_ptr` points to a sampled allocation.
This commit is contained in:
parent
e4c36a6f30
commit
3b5eecf102
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
|
|||
* counters.
|
||||
*/
|
||||
if (unlikely(old_sampled)) {
|
||||
prof_free_sampled_object(tsd, ptr, old_usize, old_tctx);
|
||||
prof_free_sampled_object(tsd, old_ptr, old_usize, old_tctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue