[SVACE][Fix for DF180801-01358] 06/186206/2 accepted/tizen/unified/20180808.141332 submit/tizen/20180808.064835
authorAbhishek Vijay <abhishek.v@samsung.com>
Wed, 8 Aug 2018 05:15:13 +0000 (10:45 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Wed, 8 Aug 2018 05:30:21 +0000 (05:30 +0000)
Change-Id: Idb4e95d28971d54d7702e3a517d933459198792f
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
server/src/account-server-db.c

index 2510ba4..75bd125 100644 (file)
@@ -2966,7 +2966,9 @@ GSList* _account_type_query_provider_feature_by_app_id(const char* app_id, int *
 
        rc = _account_query_step(hstmt);
 
-       ACCOUNT_CATCH_ERROR_P(rc == SQLITE_ROW, { *error_code = _ACCOUNT_ERROR_RECORD_NOT_FOUND; _ERR("The record isn't found from user db. rc=[%d]", rc); }, _ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
+       ACCOUNT_CATCH_ERROR_P(rc == SQLITE_ROW, { *error_code = _ACCOUNT_ERROR_RECORD_NOT_FOUND;
+                       _ERR("The record isn't found from user db. rc=[%d]", rc); },
+                               _ACCOUNT_ERROR_RECORD_NOT_FOUND, ("The record isn't found.\n"));
 
        provider_feature_s* feature_record = NULL;
 
@@ -3009,8 +3011,10 @@ CATCH:
        if (*error_code == _ACCOUNT_ERROR_RECORD_NOT_FOUND)
                feature_list = _account_type_query_provider_feature_by_app_id_from_global_db(app_id, error_code);
 
-       if (*error_code != _ACCOUNT_ERROR_NONE)
+       if (*error_code != _ACCOUNT_ERROR_NONE) {
                _account_type_gslist_feature_free(feature_list);
+               return NULL;
+       }
 
        _INFO("Returning account feature_list");