From ef961738ecb854f2938de58fa083b7d1a8d3fe6b Mon Sep 17 00:00:00 2001 From: Lohit Agarwalla Date: Fri, 22 Oct 2021 14:42:00 +0530 Subject: [PATCH] Free leaked memory Change-Id: I845effead0954d349ebd652a2917924bfe6ada3e Signed-off-by: Lohit Agarwalla (cherry picked from commit 4083581e03dbba2c1473bc7fae59e89e61e01678) --- server/fido_app_id_handler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/fido_app_id_handler.c b/server/fido_app_id_handler.c index f845947..395d751 100755 --- a/server/fido_app_id_handler.c +++ b/server/fido_app_id_handler.c @@ -222,17 +222,20 @@ __get_pub_key(const char *json_id_str) if (strcmp(os, FIDO_APP_ID_KEY_TIZEN) != 0) { _ERR("[%s] is not supported", os); + free(tempStr); return NULL; } char *type = strtok_r(NULL, ":", &save_ptr); if (type == NULL) { + free(tempStr); return NULL; } if (strcmp(type, FIDO_APP_ID_KEY_PKG_HASH) != 0) { _ERR("[%s] is not supported", type); + free(tempStr); return NULL; } -- 2.7.4