From ed619dcfee321f05f158ea2e78d8a1803b52008c Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Wed, 11 Jan 2017 14:57:47 +0100 Subject: [PATCH] Prevent exceptions in ScopedInstaller destructor Change-Id: Ibc52d27f0c0dd0cdb30233481a70e336b5302a73 --- src/security-manager-tests/common/scoped_installer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/security-manager-tests/common/scoped_installer.h b/src/security-manager-tests/common/scoped_installer.h index 639aa116..a495dfb0 100644 --- a/src/security-manager-tests/common/scoped_installer.h +++ b/src/security-manager-tests/common/scoped_installer.h @@ -31,6 +31,7 @@ #include #include #include +#include class ScopedInstaller { public: @@ -83,7 +84,9 @@ public: virtual ~ScopedInstaller() { if (m_creatorPid == getpid()) - uninstallApp(); + { + SafeCleanup::run([this]{ uninstallApp(); }); + } } void uninstallApp() { -- 2.34.1