Skip to content

Commit

Permalink
fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Mar 12, 2020
1 parent 6ed3939 commit dc29b0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libopensc/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dc29b0f

Please sign in to comment.