diff options
| author | Peter Jones <pjones@redhat.com> | 2021-03-27 18:21:17 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-03-28 13:20:04 -0400 |
| commit | 2eaea5dae5b6427b9e034e067ccacfc0b76aa9d0 (patch) | |
| tree | 7f63f967315337c6ace7fb71dfd39a0e6aec5baf /lib/simple_file.c | |
| parent | 32494b1c2bd5c870c2e7108e16ac5f95b3e8cc1d (diff) | |
| download | efi-boot-shim-2eaea5dae5b6427b9e034e067ccacfc0b76aa9d0.tar.gz efi-boot-shim-2eaea5dae5b6427b9e034e067ccacfc0b76aa9d0.zip | |
test_verify_sbat_null_sbat_section(): call cleanup_sbat_var()
This fixes a memory leak caused by test_verify_sbat_null_sbat_section()
not calling cleanup_sbat_var().
Before:
==2591367== Memcheck, a memory error detector
==2591367== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2591367== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==2591367== Command: ./test-sbat
==2591367==
==2591367==
==2591367== HEAP SUMMARY:
==2591367== in use at exit: 56 bytes in 1 blocks
==2591367== total heap usage: 17 allocs, 16 frees, 5,382 bytes allocated
==2591367==
==2591367== 56 bytes in 1 blocks are definitely lost in loss record 1 of 1
==2591367== at 0x4845464: calloc (vg_replace_malloc.c:1117)
==2591367== by 0x402AEB: parse_sbat_var_data (sbat.c:234)
==2591367== by 0x40189D: UnknownInlinedFun (test-sbat.c:445)
==2591367== by 0x40189D: main (test-sbat.c:1033)
==2591367==
==2591367== LEAK SUMMARY:
==2591367== definitely lost: 56 bytes in 1 blocks
==2591367== indirectly lost: 0 bytes in 0 blocks
==2591367== possibly lost: 0 bytes in 0 blocks
==2591367== still reachable: 0 bytes in 0 blocks
==2591367== suppressed: 0 bytes in 0 blocks
==2591367==
==2591367== For lists of detected and suppressed errors, rerun with: -s
==2591367== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
After:
==2645037== Memcheck, a memory error detector
==2645037== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2645037== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==2645037== Command: ./test-sbat
==2645037==
==2645037==
==2645037== HEAP SUMMARY:
==2645037== in use at exit: 0 bytes in 0 blocks
==2645037== total heap usage: 17 allocs, 17 frees, 5,382 bytes allocated
==2645037==
==2645037== All heap blocks were freed -- no leaks are possible
==2645037==
==2645037== For lists of detected and suppressed errors, rerun with: -s
==2645037== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib/simple_file.c')
0 files changed, 0 insertions, 0 deletions
