Skip to content

Commit 20cd2de

Browse files
committed
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.
1 parent a7fdcc8 commit 20cd2de

File tree

1 file changed

+1
-0
lines changed
  • include/jemalloc/internal

1 file changed

+1
-0
lines changed

include/jemalloc/internal/prof.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx,
513513
* though its actual usize was insufficient to cross the
514514
* sample threshold.
515515
*/
516+
prof_alloc_rollback(tsd, tctx, true);
516517
tctx = (prof_tctx_t *)(uintptr_t)1U;
517518
}
518519
}

0 commit comments

Comments
 (0)