summaryrefslogtreecommitdiff
path: root/pkgmgr_account/src/account.cpp
diff options
context:
space:
mode:
authorYoonchan Choi <yc81.choi@samsung.com>2013-04-13 19:34:54 +0900
committerYoonchan Choi <yc81.choi@samsung.com>2013-04-13 19:34:54 +0900
commitd57e6b77d36f6d7fac2176d748a6394f8885ea55 (patch)
treec49d7284b53b2f9e15c75ba13bf392f612324706 /pkgmgr_account/src/account.cpp
parentb46c532d271c71813a61761cc62e2d587e5567cf (diff)
downloadsocial-d57e6b77d36f6d7fac2176d748a6394f8885ea55.tar.gz
social-d57e6b77d36f6d7fac2176d748a6394f8885ea55.tar.bz2
social-d57e6b77d36f6d7fac2176d748a6394f8885ea55.zip
Fix the prevent defect in account plug-in lib
Change-Id: I32687f21135882ba7c8ac06aeb5ab12e20fc4737 Signed-off-by: Yoonchan Choi <yc81.choi@samsung.com>
Diffstat (limited to 'pkgmgr_account/src/account.cpp')
-rw-r--r--pkgmgr_account/src/account.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgmgr_account/src/account.cpp b/pkgmgr_account/src/account.cpp
index 9fd5ff2..3e439a3 100644
--- a/pkgmgr_account/src/account.cpp
+++ b/pkgmgr_account/src/account.cpp
@@ -68,9 +68,10 @@ int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char* packageId)
ret = account_type_create(&accountTypeHandle);
if (ret != ACCOUNT_ERROR_NONE || accountTypeHandle == null)
{
- SysLog(NID_SCL, "Memory allocation failed.");
- account_disconnect();
+ ret = account_disconnect();
+ _SysTryReturn(NID_SCL, ret == ACCOUNT_ERROR_NONE, -1, "A system error has occurred.");
+ SysLog(NID_SCL, "Memory allocation failed.");
return -ENOMEM;
}