fixed memory leak

fixes https://oss-fuzz.com/testcase-detail/6237284133502976
This commit is contained in:
Frank Morgner 2020-03-12 23:07:17 +01:00
parent 6ed3939ae5
commit dc29b0fe18
1 changed files with 2 additions and 0 deletions

View File

@ -171,6 +171,8 @@ int sc_enum_apps(sc_card_t *card)
sc_format_path("3F002F00", &path);
r = sc_select_file(card, &path, &ef_dir);
if (r < 0)
sc_file_free(ef_dir);
LOG_TEST_RET(ctx, r, "Cannot select EF.DIR file");
if (ef_dir->type != SC_FILE_TYPE_WORKING_EF) {