itacns: Correctly free allocated memory

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28510
This commit is contained in:
Jakub Jelen 2020-12-11 19:08:28 +01:00 committed by Jakub Jelen
parent 049b2a8754
commit 3135fccdca
1 changed files with 1 additions and 0 deletions

View File

@ -503,6 +503,7 @@ static int itacns_get_serialnr(sc_card_t *card, sc_serial_number_t *serial)
return SC_ERROR_WRONG_CARD;
}
len = file->size;
sc_file_free(file);
//Returned file->size should be 16.
//We choose to not consider it as critical, because some cards