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

Side by Side Diff: src/platform/vboot_reference/tests/kernel_image_tests.c

Issue 858008: VBoot Reference: Fix many memory leaks. (Closed)
Patch Set: Created 10 years, 9 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 unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Tests for kernel image library. 5 * Tests for kernel image library.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 /* Test Kernel blob verify operations. */ 228 /* Test Kernel blob verify operations. */
229 if (!VerifyKernelTest(kernel_blob, firmware_key_blob)) 229 if (!VerifyKernelTest(kernel_blob, firmware_key_blob))
230 error_code = 255; 230 error_code = 255;
231 231
232 /* Test KernelImage verify operations. */ 232 /* Test KernelImage verify operations. */
233 if (!VerifyKernelImageTest(image, firmware_key)) 233 if (!VerifyKernelImageTest(image, firmware_key))
234 error_code = 255; 234 error_code = 255;
235 if (!VerifyKernelImageTamperTest(image, firmware_key)) 235 if (!VerifyKernelImageTamperTest(image, firmware_key))
236 error_code = 255; 236 error_code = 255;
237 237
238 failure: 238 failure:
Luigi Semenzato 2010/03/13 01:21:09 Nit: I wouldn't call this "failure" since you go t
gauravsh 2010/03/13 01:36:39 Yeah. I might change this at some point. I might j
239 Free(kernel_blob); 239 Free(kernel_blob);
240 KernelImageFree(image); 240 KernelImageFree(image);
241 Free(kernel_sign_key_buf); 241 Free(kernel_sign_key_buf);
242 Free(firmware_key_blob); 242 Free(firmware_key_blob);
243 Free(firmware_key); 243 RSAPublicKeyFree(firmware_key);
244 244
245 return error_code; 245 return error_code;
246 } 246 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/firmware_image_tests.c ('k') | src/platform/vboot_reference/tests/rsa_padding_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698