Index: sandbox/win/tests/common/controller.cc |
diff --git a/sandbox/win/tests/common/controller.cc b/sandbox/win/tests/common/controller.cc |
index 2067d2d9e01958ca48543448c40fb52e0322dca1..9f57137c0e7d31844d75addb1590bd7080f6c476 100644 |
--- a/sandbox/win/tests/common/controller.cc |
+++ b/sandbox/win/tests/common/controller.cc |
@@ -136,12 +136,15 @@ void TestRunner::Init(JobLevel job_level, |
} |
TargetPolicy* TestRunner::GetPolicy() { |
- return policy_.get(); |
+ return policy_; |
} |
TestRunner::~TestRunner() { |
if (target_process_.IsValid() && kill_on_destruction_) |
::TerminateProcess(target_process_.Get(), 0); |
+ |
+ if (policy_) |
+ policy_->Release(); |
} |
bool TestRunner::AddRule(TargetPolicy::SubSystem subsystem, |