Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_astlpc: Clean up after test case
Free all allocated memory to avoid false-positive leak reports. Resolves: ==11807==ERROR: LeakSanitizer: detected memory leaks Indirect leak of 552 byte(s) in 1 object(s) allocated from: #0 0x7f74718fbae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7f74717bacf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7f74717b5edc in mctp_init /home/andrew/src/openbmc/libmctp/core.c:234 #3 0x56157917c7ee in main tests/test_astlpc.c:160 #4 0x7f7470c661e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2) Indirect leak of 384 byte(s) in 1 object(s) allocated from: #0 0x7f74718fbae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7f74717bacf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7f74717c2cd0 in __mctp_astlpc_init /home/andrew/src/openbmc/libmctp/astlpc.c:364 #3 0x7f74717c31f0 in mctp_astlpc_init_ops /home/andrew/src/openbmc/libmctp/astlpc.c:388 #4 0x56157917c88f in main tests/test_astlpc.c:165 #5 0x7f7470c661e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2) Indirect leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7f74718fbae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7f74717bacf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7f74717b655f in mctp_register_bus /home/andrew/src/openbmc/libmctp/core.c:277 #3 0x56157917c903 in main tests/test_astlpc.c:167 #4 0x7f7470c661e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2) Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7f74718fbae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8) #1 0x7f74717bacf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28 #2 0x7f74717c34b2 in mctp_astlpc_init_ops /home/andrew/src/openbmc/libmctp/astlpc.c:400 #3 0x56157917c88f in main tests/test_astlpc.c:165 #4 0x7f7470c661e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2) Signed-off-by: Andrew Jeffery <[email protected]> Change-Id: I3f67e48b22948e18aea91d6fa28135e528268bc1
- Loading branch information