Commit 58c38c2d authored by Jason Ginchereau's avatar Jason Ginchereau Committed by Michael Zasso
Browse files

src: fix TracingController cleanup

This fixes an incorrect deletion of the `TracingController` instance,
which in some environments could cause an error about an invalid
pointer passed to `free()`. The `TracingController` instance is
actually owned by a `unique_ptr` member of the platform, so calling
`platform::SetTracingController(nullptr)` is the correct way to
delete it. But before that, the `TraceBuffer` must be deleted in
order for the tracing loop to exit; that is accomplished by calling
`TracingController::Initialize(nullptr)`.

PR-URL: https://github.com/nodejs/node/pull/10623


Reviewed-By: default avatarMatthew Loring <mattloring@google.com>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
parent a5bdcc39
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment