Parent: fb09ce5cfda1630136575ee5cc201390ab73068b
Author: Iulia Tanasescu <iulia.tanasescu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-11-05 16:09:23
Tree: d4ede0ee364a9b8cda88139667f47777c4475eeb
iso-tester: Fix memory leaks in iso_accept_cb This fixes memory leaks that appear in iso_accept_cb because a new io channel is allocated but never unreferenced at the end of the test. ================================================================= ==20460==ERROR: LeakSanitizer: detected memory leaks Direct leak of 120 byte(s) in 1 object(s) allocated from: #0 0x7dcddc8fbb37 in malloc ../../../../src/libsanitizer/asan/ asan_malloc_linux.cpp:69 #1 0x7dcddc719af9 in g_malloc (/lib/x86_64-linux-gnu/ libglib-2.0.so.0+0x62af9) #2 0x7dcddc7722bd in g_io_channel_unix_new (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0xbb2bd #3 0x5d3fdfe28262 in iso_accept_cb tools/iso-tester.c:3004 Indirect leak of 6 byte(s) in 1 object(s) allocated from: #0 0x7dcddc8fbb37 in malloc ../../../../src/libsanitizer/asan/ asan_malloc_linux.cpp:69 #1 0x7dcddc719af9 in g_malloc (/lib/x86_64-linux-gnu/ libglib-2.0.so.0+0x62af9) #2 0x7dcddc70016f in g_io_channel_init (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4916f) #3 0x7dcddc7722c8 in g_io_channel_unix_new (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0xbb2c8) #4 0x5d3fdfe28262 in iso_accept_cb tools/iso-tester.c:3004 SUMMARY: AddressSanitizer: 126 byte(s) leaked in 2 allocation(s).
Diffstat
| M | tools/iso-tester.c | | | 10 | ++++++++- - |
1 files changed, 8 insertions(+), 2 deletions(-)