From 41238f29c462161dbd25a5b80e20b8c306f568b9 Mon Sep 17 00:00:00 2001 From: Jaemin Ahn Date: Fri, 19 Apr 2013 12:31:06 +0900 Subject: [PATCH] Fix a prevent defect. Change-Id: I262386adcdb50c6f04e0f9cc0ce723ca1a507990 Signed-off-by: Jaemin Ahn --- src/FMsg_PushManagerImpl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FMsg_PushManagerImpl.cpp b/src/FMsg_PushManagerImpl.cpp index 41284bc..6db5ea3 100755 --- a/src/FMsg_PushManagerImpl.cpp +++ b/src/FMsg_PushManagerImpl.cpp @@ -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); -- 2.7.4