From ba6d3475d80703f1cc4b8050937adf32941bcf5d Mon Sep 17 00:00:00 2001 From: Abhimanyu Swami Date: Sat, 1 Oct 2022 20:27:38 +0530 Subject: [PATCH] Coverity issue fixed Change-Id: I55c665dbaa27ac4fc8f8b2c92983ba1287984a44 Signed-off-by: Abhimanyu Swami --- server/fido_app_id_handler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/fido_app_id_handler.c b/server/fido_app_id_handler.c index 395d751..6af5d45 100755 --- a/server/fido_app_id_handler.c +++ b/server/fido_app_id_handler.c @@ -240,7 +240,13 @@ __get_pub_key(const char *json_id_str) } char *pub_key = strtok_r(NULL, ":", &save_ptr); - RET_IF_FAIL(pub_key != NULL, NULL); + + if (pub_key == NULL) { + free(tempStr); + return NULL; + } + + free(tempStr); return pub_key; } -- 2.7.4