Skip to content

Commit

Permalink
Fix potential memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
beldmit authored and LDVG committed Mar 22, 2024
1 parent 723788f commit a1e9f87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/credman.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ print_rk(const fido_credman_rk_t *rk, size_t idx)
if (base64_encode(fido_cred_id_ptr(cred), fido_cred_id_len(cred),
&id) < 0 || base64_encode(fido_cred_user_id_ptr(cred),
fido_cred_user_id_len(cred), &user_id) < 0) {
free(user_id);
free(id);
warnx("output error");
return -1;
}
Expand Down

0 comments on commit a1e9f87

Please sign in to comment.