D-Bus: Fix P2P peer joined/disconnected handlers
It is possible for the peer to be a non-P2P device and as such, for p2p_dev_addr to be NULL. This resulted in NULL pointer dereference if D-Bus interface was enabled for the interface when a legacy STA joined a group. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b8db1dfc5c
commit
11973b2682
1 changed files with 4 additions and 2 deletions
|
@ -648,6 +648,7 @@ static void wpas_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
|
||||||
* Create 'peer-joined' signal on group object -- will also
|
* Create 'peer-joined' signal on group object -- will also
|
||||||
* check P2P itself.
|
* check P2P itself.
|
||||||
*/
|
*/
|
||||||
|
if (p2p_dev_addr)
|
||||||
wpas_dbus_signal_p2p_peer_joined(wpa_s, p2p_dev_addr);
|
wpas_dbus_signal_p2p_peer_joined(wpa_s, p2p_dev_addr);
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
@ -665,6 +666,7 @@ static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant *wpa_s,
|
||||||
* Create 'peer-disconnected' signal on group object if this
|
* Create 'peer-disconnected' signal on group object if this
|
||||||
* is a P2P group.
|
* is a P2P group.
|
||||||
*/
|
*/
|
||||||
|
if (p2p_dev_addr)
|
||||||
wpas_dbus_signal_p2p_peer_disconnected(wpa_s, p2p_dev_addr);
|
wpas_dbus_signal_p2p_peer_disconnected(wpa_s, p2p_dev_addr);
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue