]> git.feebdaed.xyz Git - 0xmirror/SOEM.git/commit
tests: fix linked list leak
authorJohannes Kauffmann <johanneskauffmann@hotmail.com>
Tue, 23 Jan 2024 08:04:54 +0000 (09:04 +0100)
committerHans-Erik Floryd <hans-erik.floryd@rt-labs.com>
Tue, 8 Apr 2025 12:33:08 +0000 (14:33 +0200)
commit2f08b49aac01ef4512ff515f2d9d368977abca4c
treec3338014bdaa2aeadc5103e5767c69402cd2cbc9
parent7271d3663e37adcb3072e43ecd0a600ec6d70096
tests: fix linked list leak

Don't overwrite the original pointer returned by ec_find_adapters(),
otherwise the linked list is leaked. Instead, save original pointer to
the head of the list use and `adapters` as a temporary variable. Pass
the original pointer to ec_free_adapters().

For win32, ec_free_adapters() was missing entirely.
test/linux/eepromtool/eepromtool.c
test/linux/simple_test/simple_test.c
test/linux/slaveinfo/slaveinfo.c
test/simple_ng/simple_ng.c
test/win32/eepromtool/eepromtool.c
test/win32/simple_test/simple_test.c
test/win32/slaveinfo/slaveinfo.c