commit fc10ee874501c98ead1196fcad95f0dd68a2964c
parent 074bc527178c2cacc920b52b9d6c7eff630a81ff
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 1 Feb 2021 11:42:27 -0600
station: Fix not cleaning up pending_connect
If the disconnect fails and station_disconnect_onconnect_cb is called
with an error, we reply to the original message accordingly.
Unfortunately pending_connect is not unrefed or cleared in this case.
Fix that.
Fixes: d0ee923dda0b ("station: Disconnect, if needed, on a new connection attempt")
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/station.c b/src/station.c
@@ -2488,8 +2488,8 @@ static void station_disconnect_onconnect_cb(struct netdev *netdev, bool success,
station->connect_pending_bss = NULL;
if (err < 0) {
- l_dbus_send(dbus_get_bus(),
- dbus_error_from_errno(err,
+ dbus_pending_reply(&station->connect_pending,
+ dbus_error_from_errno(err,
station->connect_pending));
return;
}