Fix a prevent defect.
authorJaemin Ahn <j.m.ahn@samsung.com>
Fri, 19 Apr 2013 03:31:06 +0000 (12:31 +0900)
committerJaemin Ahn <j.m.ahn@samsung.com>
Fri, 19 Apr 2013 03:31:06 +0000 (12:31 +0900)
Change-Id: I262386adcdb50c6f04e0f9cc0ce723ca1a507990
Signed-off-by: Jaemin Ahn <j.m.ahn@samsung.com>
src/FMsg_PushManagerImpl.cpp

index 41284bc..6db5ea3 100755 (executable)
@@ -1597,7 +1597,13 @@ _PushManagerImpl::RequestPushRegistration(const _PushRequest* pRequest)
        appId = _AppInfo::GetApplicationId();
 
        pAppId = _StringConverter::CopyToCharArrayN(appId);
-       SysTryReturnResult(NID_MSG, pAppId != null, E_SYSTEM, "Failed to get the application ID.");
+       if (pAppId == null)
+       {
+               SysLogException(NID_MSG, E_OUT_OF_MEMORY, "Memory allocation failed.");
+               service_destroy(svc);
+
+               return E_OUT_OF_MEMORY;
+       }
 
        SysLog(NID_MSG, "AppId=[%s].", pAppId);