Free leaked memory 54/267254/1 accepted/tizen_6.5_unified accepted/tizen/6.5/unified/20211201.221643 submit/tizen_6.5/20211130.111750 submit/tizen_6.5/20211201.072059
authorLohit Agarwalla <l.agarwalla@samsung.com>
Fri, 22 Oct 2021 09:12:00 +0000 (14:42 +0530)
committerRandeep Singh <randeep.s@samsung.com>
Tue, 30 Nov 2021 11:11:53 +0000 (11:11 +0000)
Change-Id: I845effead0954d349ebd652a2917924bfe6ada3e
Signed-off-by: Lohit Agarwalla <l.agarwalla@samsung.com>
(cherry picked from commit 4083581e03dbba2c1473bc7fae59e89e61e01678)

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;
        }