Skip to content

Conversation

@TaeZStkyoht
Copy link

@TaeZStkyoht TaeZStkyoht commented Apr 3, 2025

  • BIGNUM must be freed both on tpm2tss_tpm2data_write and tpm2tss_tpm2data_read:
    definitely lost: 24 bytes in 1 blocks
    indirectly lost: 8 bytes in 1 blocks
  • TSSPRIVKEY's parent, privkey and pubkey members don't need to be allocated explicitly, because TSSPRIVKEY_new already does:
    definitely lost: 72 bytes in 3 blocks
    indirectly lost: 0 bytes in 0 blocks
  • TPM2_DATA* returned from RSA_get_app_data can be returned directly genkey_rsa() because RSA_free() doesn't free this item:
    definitely lost: 2,248 bytes in 1 blocks
    indirectly lost: 0 bytes in 0 blocks
  • update .gitignore to cover more generated files

@TaeZStkyoht TaeZStkyoht force-pushed the fix-memory-leak branch 3 times, most recently from add86ae to d8fa737 Compare April 3, 2025 20:00
- BIGNUM must be freed both on tpm2tss_tpm2data_write and tpm2tss_tpm2data_read:
definitely lost: 24 bytes in 1 blocks
indirectly lost: 8 bytes in 1 blocks
- TSSPRIVKEY's parent, privkey and pubkey members don't need to be allocated explicitly, because TSSPRIVKEY_new already does:
definitely lost: 72 bytes in 3 blocks
indirectly lost: 0 bytes in 0 blocks
- TPM2_DATA* returned from RSA_get_app_data can be returned directly genkey_rsa() because RSA_free() doesn't free this item:
definitely lost: 2,248 bytes in 1 blocks
indirectly lost: 0 bytes in 0 blocks
- update .gitignore to cover more generated files

Signed-off-by: Oguzhan Turk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants