From 57567fa05de6f454bfd78c7a51b0ebb5c3332734 Mon Sep 17 00:00:00 2001 From: Hokwon Song Date: Tue, 25 Jun 2013 20:09:58 +0900 Subject: [PATCH] Fix [N_SE-42866] invalid argument. Change-Id: I8ae2e10efb44d88ee166f5561c0ae828fcbb941a Signed-off-by: Hokwon Song --- src/CommonService.cpp | 5 ++++- src/FSys_DeviceManagerStub.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CommonService.cpp b/src/CommonService.cpp index 92c8f0d..8adbe6d 100644 --- a/src/CommonService.cpp +++ b/src/CommonService.cpp @@ -38,7 +38,10 @@ CommonService::CommonService(void) CommonService::~CommonService(void) { delete __pPackageManagerStub; - delete __pDeviceManagerStub; + if (__pDeviceManagerStub) + { + delete __pDeviceManagerStub; + } } ServiceApp* diff --git a/src/FSys_DeviceManagerStub.cpp b/src/FSys_DeviceManagerStub.cpp index 7cd0e9d..4ef39b4 100644 --- a/src/FSys_DeviceManagerStub.cpp +++ b/src/FSys_DeviceManagerStub.cpp @@ -57,7 +57,7 @@ _DeviceManagerStub::_DeviceManagerStub(void) { result r = E_SUCCESS; r = __Mutex.Create(DEVIVE_MANAGER_SERVICE_MUTEX_ID); - SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "It is failed to create mutex. [%s] Propaged.", r); + SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "It is failed to create mutex. [%s] Propaged.", GetErrorMessage(r)); r = __interestedPidList.Construct(); SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "It is failed to initiate bluetooth headset application list."); } @@ -80,7 +80,7 @@ _DeviceManagerStub::~_DeviceManagerStub(void) } __interestedPidList.RemoveAll(); result r = __Mutex.Release(); - SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "It is failed to release mutex. [%s] Propaged.", r); + SysTryReturn(NID_SYS, r == E_SUCCESS, , r, "It is failed to release mutex. [%s] Propaged.", GetErrorMessage(r)); } _DeviceManagerStub* -- 2.7.4