mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
p2p: Add a null-check before use
p2p_connection_reset may be called as a result of a WFD service unregistering and p2p_own_wfd is going to be NULL, don't update p2p_own_wfd->available in this case.
This commit is contained in:
parent
650e7715b1
commit
c42de40a3b
@ -486,7 +486,9 @@ static void p2p_connection_reset(struct p2p_device *dev)
|
|||||||
if (dev->conn_own_wfd) {
|
if (dev->conn_own_wfd) {
|
||||||
l_free(dev->conn_own_wfd);
|
l_free(dev->conn_own_wfd);
|
||||||
dev->conn_own_wfd = NULL;
|
dev->conn_own_wfd = NULL;
|
||||||
p2p_own_wfd->available = true;
|
|
||||||
|
if (p2p_own_wfd)
|
||||||
|
p2p_own_wfd->available = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit_bzero(dev->conn_psk, 32);
|
explicit_bzero(dev->conn_psk, 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user