From 2faa606014ad79157e2eaf7ca0589b98b586bcc3 Mon Sep 17 00:00:00 2001 From: "jiseob.jang" Date: Mon, 11 Jul 2016 21:15:53 +0900 Subject: [PATCH] [UTC][accounts-svc][Non-ACR][fix account utc crash] Change-Id: Ib3d6a13c2c3259e7d71aa96e0804bfd3dfac2d54 Signed-off-by: jiseob.jang --- src/utc/accounts-svc/utc-accounts-svc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utc/accounts-svc/utc-accounts-svc.c b/src/utc/accounts-svc/utc-accounts-svc.c index 90c3178..2387af9 100755 --- a/src/utc/accounts-svc/utc-accounts-svc.c +++ b/src/utc/accounts-svc/utc-accounts-svc.c @@ -374,7 +374,8 @@ int utc_account_insert_to_db_p(void) ret = account_get_access_token(ret_account, &ret_access_token); assert_eq(ret, ACCOUNT_ERROR_NONE); - assert_eq(strcmp(ret_access_token, access_token), 0); + if (ret_access_token != NULL && access_token != NULL) + assert_eq(strcmp(ret_access_token, access_token), 0); _account_free_text(ret_access_token); for (i = 0; i < 5; i++){ @@ -1975,7 +1976,8 @@ static bool account_call_back(account_h account, void *user_data) check_fail(ret == ACCOUNT_ERROR_NONE); ret = account_get_access_token(account, &comparison_str); check_fail(ret == ACCOUNT_ERROR_NONE); - check_fail(strcmp(str, comparison_str)==0); + if (str != NULL && comparison_str != NULL) + check_fail(strcmp(str, comparison_str)==0); _account_free_text(str); _account_free_text(comparison_str); -- 2.7.4