Task #91504 - added.err

back to task #91504
download
Error: GCC_ANALYZER_WARNING (CWE-401):
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1200:5: warning[-Wanalyzer-malloc-leak]: leak of 'buffer'
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1119:8: enter_function: entry to 'OSSLCryptKDFe'
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1140:5: branch_false: following 'false' branch...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1143:7: branch_false: following 'false' branch...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1146:12: branch_false: ...to here
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1146:12: call_function: calling 'GetDigestNameByHashAlg' from 'OSSLCryptKDFe'
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1146:12: return_function: returning to 'OSSLCryptKDFe' from 'GetDigestNameByHashAlg'
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1147:8: branch_false: following 'false' branch...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1149:9: branch_false: ...to here
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1149:8: branch_false: following 'false' branch...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1151:5: call_function: inlined call to 'strcpy' from 'OSSLCryptKDFe'
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1160:14: acquire_memory: allocated here
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1161:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1164:11: branch_false: ...to here
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1200:5: throw: if 'EVP_KDF_CTX_free' throws an exception...
libtpms-0.10.2/src/tpm2/crypto/openssl/Helpers.c:1200:5: danger: 'buffer' leaks here; was allocated at [(16)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/15)
# 1198|   
# 1199|   out:
# 1200|->     EVP_KDF_CTX_free(ctx);
# 1201|       EVP_KDF_free(kdf);
# 1202|       free(buffer);