Skip to content

Commit

Permalink
Fix memory leaks from Esys_CreatePrimary
Browse files Browse the repository at this point in the history
Signed-off-by: CharlieYJH <[email protected]>
  • Loading branch information
CharlieYJH authored and williamcroberts committed Sep 5, 2024
1 parent 18989a3 commit a9b6b91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4408,6 +4408,11 @@ WEAK CK_RV tpm_create_transient_primary_from_template(tpm_ctx *tpm,
return CKR_GENERAL_ERROR;
}

Esys_Free(data);
Esys_Free(hash);
Esys_Free(ticket);
Esys_Free(out_pub);

*primary_handle = handle;

return CKR_OK;
Expand Down

0 comments on commit a9b6b91

Please sign in to comment.