3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +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:
Andrew Zaborowski 2020-07-31 03:31:29 +02:00 committed by Denis Kenzior
parent 650e7715b1
commit c42de40a3b

View File

@ -486,6 +486,8 @@ static void p2p_connection_reset(struct p2p_device *dev)
if (dev->conn_own_wfd) {
l_free(dev->conn_own_wfd);
dev->conn_own_wfd = NULL;
if (p2p_own_wfd)
p2p_own_wfd->available = true;
}