Free leaked memory 75/265575/1 accepted/tizen/unified/20211201.123235 submit/tizen/20211130.111014
authorLohit Agarwalla <l.agarwalla@samsung.com>
Fri, 22 Oct 2021 09:12:00 +0000 (14:42 +0530)
committerLohit Agarwalla <l.agarwalla@samsung.com>
Fri, 22 Oct 2021 09:12:00 +0000 (14:42 +0530)
Change-Id: I845effead0954d349ebd652a2917924bfe6ada3e
Signed-off-by: Lohit Agarwalla <l.agarwalla@samsung.com>
server/fido_app_id_handler.c

index f845947..395d751 100755 (executable)
@@ -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;
        }