Skip to content

Commit 93f25f4

Browse files
committed
test: properly order freeing resources in cctest
The `IsolateData` instance is created before the `Environment` instance, so free in reverse order. Fixes: #14206 PR-URL: #14749 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent b559e66 commit 93f25f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/cctest/test_environment.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class EnvironmentTest : public NodeTestFixture {
4141
}
4242

4343
~Env() {
44-
FreeIsolateData(isolate_data_);
4544
environment_->CleanupHandles();
4645
FreeEnvironment(environment_);
46+
FreeIsolateData(isolate_data_);
4747
}
4848

4949
Environment* operator*() const {

0 commit comments

Comments
 (0)