audk/CryptoPkg/Library/BaseCryptLib/Pk
Long Qin 6fe575d052 CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free
The malloc/free (instead of AllocatePool/FreePool) were used directly
in some wrapper implementations, which was designed to leverage the
light-weight memory management routines at Runtime phase.
The malloc/free and AllocatePool/FreePool usages are required to be
matched, after extra memory size info header was introduced in malloc
wrapper.

This patch corrects two memory allocation cases, which requires the
caller to free the buffer with FreePool() outside the function call.

And some comments were also added to clarify the correct memory
release functions if it's the caller's responsibility to free the
memory buffer.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ting Ye <ting.ye@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2017-11-06 14:51:39 +08:00
..
CryptAuthenticode.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptAuthenticodeNull.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptDh.c CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify 2017-05-22 08:57:48 +08:00
CryptDhNull.c Add interfaces to several library instances of BaseCryptLib. 2012-07-18 09:32:05 +00:00
CryptPkcs5Pbkdf2.c CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation. 2016-11-02 23:19:01 +08:00
CryptPkcs5Pbkdf2Null.c CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation. 2016-11-02 23:19:01 +08:00
CryptPkcs7Sign.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptPkcs7SignNull.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptPkcs7Verify.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptPkcs7VerifyNull.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptRsaBasic.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptRsaExt.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptRsaExtNull.c Add interfaces to several library instances of BaseCryptLib. 2012-07-18 09:32:05 +00:00
CryptTs.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptTsNull.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptX509.c CryptoPkg: Add new API to retrieve commonName of X.509 certificate 2017-09-25 00:06:41 +08:00
CryptX509Null.c CryptoPkg: Add new API to retrieve commonName of X.509 certificate 2017-09-25 00:06:41 +08:00