Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1328)

Unified Diff: src/tcs/tcs_pbg.c

Issue 3581012: Upgrade from trousers 0.3.3 to 0.3.6 and from testsuite 0.2 to 0.3. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/trousers.git
Patch Set: git cl push Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/tcs/tcs_evlog_imaem.c ('k') | src/tcs/tcsi_own.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tcs/tcs_pbg.c
diff --git a/src/tcs/tcs_pbg.c b/src/tcs/tcs_pbg.c
index c70f73193d69d2c36aaf4845f2834a714349fcf5..5eaa6f7295146bf53396c2b44a2bf650a8c663e8 100644
--- a/src/tcs/tcs_pbg.c
+++ b/src/tcs/tcs_pbg.c
@@ -468,6 +468,7 @@ tpm_rsp_parse(TPM_COMMAND_CODE ordinal, BYTE *b, UINT32 len, ...)
UnloadBlob_UINT32(&offset1, len2, b);
if ((*blob2 = malloc(*len2)) == NULL) {
+ free(*blob1);
LogError("malloc of %u bytes failed", *len2);
return TCSERR(TSS_E_OUTOFMEMORY);
}
@@ -549,6 +550,7 @@ tpm_rsp_parse(TPM_COMMAND_CODE ordinal, BYTE *b, UINT32 len, ...)
UnloadBlob_UINT32(&offset2, len2, b);
if ((*blob2 = malloc(*len2)) == NULL) {
+ free(*blob1);
LogError("malloc of %u bytes failed", *len2);
return TCSERR(TSS_E_OUTOFMEMORY);
}
« no previous file with comments | « src/tcs/tcs_evlog_imaem.c ('k') | src/tcs/tcsi_own.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698