From fc10ee874501c98ead1196fcad95f0dd68a2964c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 1 Feb 2021 11:42:27 -0600 Subject: [PATCH] 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") --- src/station.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/station.c b/src/station.c index 14a3d171..1bbc7ca3 100644 --- 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; }