Skip to content

Commit

Permalink
authentic: Avoid use after free
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakuje committed Dec 20, 2023
1 parent 5def7eb commit 5835f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pkcs15init/pkcs15-authentic.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ authentic_emu_update_tokeninfo(struct sc_profile *profile, struct sc_pkcs15_card
rv = sc_select_file(p15card->card, &path, &file);
if (!rv) {
rv = sc_get_challenge(p15card->card, buffer, sizeof(buffer));
if (!rv) {
if (rv < 0) {
sc_file_free(file);
LOG_TEST_RET(ctx, rv, "Get challenge error");
}
Expand Down

0 comments on commit 5835f0d

Please sign in to comment.