Fix [N_SE-42866] invalid argument.
authorHokwon Song <hokwon.song@samsung.com>
Tue, 25 Jun 2013 11:09:58 +0000 (20:09 +0900)
committerHokwon Song <hokwon.song@samsung.com>
Tue, 25 Jun 2013 11:09:58 +0000 (20:09 +0900)
Change-Id: I8ae2e10efb44d88ee166f5561c0ae828fcbb941a
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
src/CommonService.cpp
src/FSys_DeviceManagerStub.cpp

index 92c8f0d..8adbe6d 100644 (file)
@@ -38,7 +38,10 @@ CommonService::CommonService(void)
 CommonService::~CommonService(void)
 {
        delete __pPackageManagerStub;
-       delete __pDeviceManagerStub;
+       if (__pDeviceManagerStub)
+       {
+               delete __pDeviceManagerStub;
+       }
 }
 
 ServiceApp*
index 7cd0e9d..4ef39b4 100644 (file)
@@ -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*