Add reference on kernel in blocked scenarios.

- Prevents kernel destruction while it may still be in use.

Change-Id: I1f87d09c5cabf29644a1b06b63f1789dbb15985a
This commit is contained in:
Mrozek, Michal
2018-01-04 16:34:25 +01:00
parent 57137fea84
commit 3eb856b192
6 changed files with 29 additions and 5 deletions

View File

@@ -212,8 +212,8 @@ class MockKernelWithInternals {
mockKernel->setSshLocal(&sshLocal, sizeof(sshLocal));
}
~MockKernelWithInternals() {
delete mockKernel;
delete mockProgram;
mockKernel->decRefInternal();
mockProgram->decRefInternal();
}
operator MockKernel *() {