From: Lohit Agarwalla Date: Fri, 22 Oct 2021 09:12:00 +0000 (+0530) Subject: Free leaked memory X-Git-Tag: accepted/tizen/unified/20211201.123235^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F265575%2F1;p=platform%2Fcore%2Faccount%2Ffido-client.git Free leaked memory Change-Id: I845effead0954d349ebd652a2917924bfe6ada3e Signed-off-by: Lohit Agarwalla --- 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; }