OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Licensed Materials - Property of IBM | 3 * Licensed Materials - Property of IBM |
4 * | 4 * |
5 * trousers - An open source TCG Software Stack | 5 * trousers - An open source TCG Software Stack |
6 * | 6 * |
7 * (C) Copyright International Business Machines Corp. 2004-2007 | 7 * (C) Copyright International Business Machines Corp. 2004-2007 |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 free(dec); | 94 free(dec); |
95 LogError("malloc of %u bytes failed", *randomSize); | 95 LogError("malloc of %u bytes failed", *randomSize); |
96 *randomSize = 0; | 96 *randomSize = 0; |
97 return TSPERR(TSS_E_OUTOFMEMORY); | 97 return TSPERR(TSS_E_OUTOFMEMORY); |
98 } | 98 } |
99 Trspi_UnloadBlob(&offset, *randomSize, dec, *random); | 99 Trspi_UnloadBlob(&offset, *randomSize, dec, *random); |
100 | 100 |
101 Trspi_UnloadBlob_UINT32(&offset, outDataSize, dec); | 101 Trspi_UnloadBlob_UINT32(&offset, outDataSize, dec); |
102 | 102 |
103 if ((*outData = malloc(*outDataSize)) == NULL) { | 103 if ((*outData = malloc(*outDataSize)) == NULL) { |
104 » » free(random); | 104 » » free(*random); |
105 *random = NULL; | 105 *random = NULL; |
106 *randomSize = 0; | 106 *randomSize = 0; |
107 free(dec); | 107 free(dec); |
108 LogError("malloc of %u bytes failed", *outDataSize); | 108 LogError("malloc of %u bytes failed", *outDataSize); |
109 *outDataSize = 0; | 109 *outDataSize = 0; |
110 return TSPERR(TSS_E_OUTOFMEMORY); | 110 return TSPERR(TSS_E_OUTOFMEMORY); |
111 } | 111 } |
112 Trspi_UnloadBlob(&offset, *outDataSize, dec, *outData); | 112 Trspi_UnloadBlob(&offset, *outDataSize, dec, *outData); |
113 free(dec); | 113 free(dec); |
114 | 114 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 free(data); | 254 free(data); |
255 | 255 |
256 *MigrationKeyAuthSize = decLen; | 256 *MigrationKeyAuthSize = decLen; |
257 *MigrationKeyAuth = dec; | 257 *MigrationKeyAuth = dec; |
258 | 258 |
259 return result; | 259 return result; |
260 } | 260 } |
261 | 261 |
262 #endif | 262 #endif |
263 | 263 |
OLD | NEW |