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: d0ee923dda ("station: Disconnect, if needed, on a new connection attempt")
This commit is contained in:
Denis Kenzior 2021-02-01 11:42:27 -06:00
parent 074bc52717
commit fc10ee8745
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}