summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJooseok Song <seogii.song@samsung.com>2017-09-21 11:16:29 +0900
committerJooseok Song <seogii.song@samsung.com>2017-09-21 20:01:23 +0900
commit09199acfdf1d3a98b4389efb851f79a282aa1c5c (patch)
tree47182abbe4352aedfb4d7e4dfe88ca27a471945c
parentac8c34e16d45023939fcd1483837f80083260a4e (diff)
downloadmy-account-tizen_5.5_mobile_hotfix.tar.gz
my-account-tizen_5.5_mobile_hotfix.tar.bz2
my-account-tizen_5.5_mobile_hotfix.zip
Change-Id: I5a88d4582e1820522c66021e827e155111bb3de0
-rw-r--r--src/my-account-view-main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/my-account-view-main.c b/src/my-account-view-main.c
index 19c5cbf..9ef2ddd 100644
--- a/src/my-account-view-main.c
+++ b/src/my-account-view-main.c
@@ -303,6 +303,7 @@ bool __myaccount_get_capablity_cb(const char* capability_type, account_capabilit
myaccount_capability_data *cap_data = (myaccount_capability_data*)malloc(sizeof(myaccount_capability_data));
if (!cap_data) {
+ myaccount_release_account_info(account_info);
MA_DEBUG_ERR("malloc failed\n");
return true;
}
@@ -320,6 +321,7 @@ bool __myaccount_get_capablity_cb(const char* capability_type, account_capabilit
if (strlen(capability_textbuf) > 0) {
char *temp2 = strdup(capability_textbuf);
if (!temp2) {
+ myaccount_release_account_info(account_info);
MA_DEBUG_ERR("strdup returns NULL\n");
return false;
}
@@ -331,6 +333,8 @@ bool __myaccount_get_capablity_cb(const char* capability_type, account_capabilit
}
}
+ myaccount_release_account_info(account_info);
+
return true;
}
@@ -409,7 +413,7 @@ bool __myaccount_get_account_list_info_cb(account_h account, void *user_data)
ret = account_get_secret(account, &secret);
if (ret != ACCOUNT_ERROR_NONE)
MA_DEBUG_ERR("account_get_secret: Failed \n");
- else if (secret >= ACCOUNT_SECRECY_INVALID && secret < ACCOUNT_SECRECY_MAX)
+ else if (secret > ACCOUNT_SECRECY_INVALID && secret < ACCOUNT_SECRECY_MAX)
account_info->secret = secret;
else
account_info->secret = ACCOUNT_SECRECY_INVALID;