Skip to content

Commit

Permalink
Fix potential memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
beldmit committed Mar 21, 2024
1 parent 5d14e82 commit ed6cadd
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 ed6cadd

Please sign in to comment.