audk/CryptoPkg/Library
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
..
BaseCryptLib CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
BaseCryptLibRuntimeCryptProtocol CryptoPkg: Add new API to retrieve commonName of X.509 certificate 2017-09-25 00:06:41 +08:00
Include CryptoPkg: Fix possible unresolved external symbol issue. 2017-04-07 00:27:34 +08:00
IntrinsicLib CryptoPkg IntrinsicLib: Remove GCC -fno-builtin option 2017-04-07 15:15:58 +08:00
OpensslLib CryptoPkg/OpensslLib AARCH64: clear XIP CC flags 2017-07-15 13:36:58 +01:00
TlsLib CryptoPkg/TlsLib: Remove the redundant free of BIO objects 2017-08-02 15:31:46 +08:00