summaryrefslogtreecommitdiff
path: root/SecurityPkg/Tcg
diff options
context:
space:
mode:
authorgdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-26 05:17:35 +0000
committergdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-26 05:17:35 +0000
commitf5af77a80ff54f3c37cfb16ff5ede38a75008ea1 (patch)
tree2fcff513f06d330e66286b2c5f8ae50b4cedc5ad /SecurityPkg/Tcg
parent5a5003323610f215591bd3c0bd1a426583e70fc7 (diff)
downloadedk2-f5af77a80ff54f3c37cfb16ff5ede38a75008ea1.zip
edk2-f5af77a80ff54f3c37cfb16ff5ede38a75008ea1.tar.gz
edk2-f5af77a80ff54f3c37cfb16ff5ede38a75008ea1.tar.bz2
Fix a failure in TCG HashAll interface.
signed-off by Tao Hengyan <hengyan.tao@intel.com> reviewed by Dong Guo <guo.dong@intel.com> reviewed by Long Qin <qin.long@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13556 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r--SecurityPkg/Tcg/TcgDxe/TcgDxe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
index 5b8f45d..4b5380b 100644
--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
@@ -262,6 +262,10 @@ TcgDxeHashAll (
}
*HashedDataLen = sizeof (TPM_DIGEST);
+ if (*HashedDataResult == NULL) {
+ *HashedDataResult = AllocatePool ((UINTN) *HashedDataLen);
+ }
+
return TpmCommHashAll (
HashData,
(UINTN) HashDataLen,