eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 08a295c3482cccac3c14ae6965bcbaa7d853e421
parent d372d59bea3e66e6638e184060769f768ea7204e
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Mon,  1 Feb 2021 15:12:17 -0600

station: Fix leaking of roam_freqs on shutdown

==17639== 72 (16 direct, 56 indirect) bytes in 1 blocks are definitely
lost in loss record 3 of 3
==17639==    at 0x4C2F0CF: malloc (vg_replace_malloc.c:299)
==17639==    by 0x4670AD: l_malloc (util.c:61)
==17639==    by 0x4215AA: scan_freq_set_new (scan.c:1906)
==17639==    by 0x412A9C: parse_neighbor_report (station.c:1910)
==17639==    by 0x407335: netdev_neighbor_report_frame_event
(netdev.c:3522)
==17639==    by 0x44BBE6: frame_watch_unicast_notify (frame-xchg.c:233)
==17639==    by 0x470C04: dispatch_unicast_watches (genl.c:961)
==17639==    by 0x470C04: process_unicast (genl.c:980)
==17639==    by 0x470C04: received_data (genl.c:1101)
==17639==    by 0x46D9DB: io_callback (io.c:118)
==17639==    by 0x46CC0C: l_main_iterate (main.c:477)
==17639==    by 0x46CCDB: l_main_run (main.c:524)
==17639==    by 0x46CF01: l_main_run_with_signal (main.c:656)
==17639==    by 0x403EDE: main (main.c:490)

Diffstat:
Msrc/station.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/station.c b/src/station.c @@ -1292,6 +1292,11 @@ static void station_roam_state_clear(struct station *station) if (station->roam_scan_id) scan_cancel(netdev_get_wdev_id(station->netdev), station->roam_scan_id); + + if (station->roam_freqs) { + scan_freq_set_free(station->roam_freqs); + station->roam_freqs = NULL; + } } static void station_reset_connection_state(struct station *station) @@ -1318,11 +1323,6 @@ static void station_reset_connection_state(struct station *station) station->connected_bss = NULL; station->connected_network = NULL; - if (station->roam_freqs) { - scan_freq_set_free(station->roam_freqs); - station->roam_freqs = NULL; - } - l_dbus_property_changed(dbus, netdev_get_path(station->netdev), IWD_STATION_INTERFACE, "ConnectedNetwork"); l_dbus_property_changed(dbus, network_get_path(network),