From 3cafccfa968fab36c2d6eac7c494d0bdfacb27f5 Mon Sep 17 00:00:00 2001 From: "srinivasa.m" Date: Fri, 4 Oct 2019 16:58:12 +0530 Subject: [PATCH] coverity issues fix Change-Id: Ia387481e5fc7d59df48cdd9bbee718026c597016 --- common/fido_json_handler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/fido_json_handler.c b/common/fido_json_handler.c index 3b8e4b2..7ea1fa5 100755 --- a/common/fido_json_handler.c +++ b/common/fido_json_handler.c @@ -1112,8 +1112,9 @@ _uaf_parser_parse_asm_response_discover(GList *asm_response_list, int *error_cod char *auth_idx_str = (char*)calloc(1, 128); if(auth_idx_str == NULL) { SAFE_DELETE(auth_info); + goto CATCH; } - CATCH_IF_FAIL(auth_idx_str != NULL); + snprintf(auth_idx_str, 127, "%d", auth_index); auth_info->auth_index = auth_idx_str; @@ -3189,8 +3190,9 @@ _uaf_parser_parser_asm_get_reg_response(const char *get_reg_resp) _asm_app_reg_t *app_reg = (_asm_app_reg_t*) calloc(1, sizeof(_asm_app_reg_t)); if(app_reg == NULL) { g_list_free_full(key_id_list, free); + goto CATCH; } - CATCH_IF_FAIL(app_reg != NULL); + if (app_id != NULL) { _INFO("app_id = [%s]", app_id); app_reg->app_id = strdup(app_id); -- 2.7.4