mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
p2p: Simplify handshake_state cleanup
This commit is contained in:
parent
78a39e926f
commit
305c4113e8
@ -1496,7 +1496,7 @@ static void p2p_handshake_event(struct handshake_state *hs,
|
|||||||
static void p2p_try_connect_group(struct p2p_device *dev)
|
static void p2p_try_connect_group(struct p2p_device *dev)
|
||||||
{
|
{
|
||||||
struct scan_bss *bss = dev->conn_wsc_bss;
|
struct scan_bss *bss = dev->conn_wsc_bss;
|
||||||
struct handshake_state *hs = NULL;
|
_auto_(handshake_state_free) struct handshake_state *hs = NULL;
|
||||||
struct iovec ie_iov[16];
|
struct iovec ie_iov[16];
|
||||||
int ie_num = 0;
|
int ie_num = 0;
|
||||||
int r;
|
int r;
|
||||||
@ -1562,6 +1562,7 @@ static void p2p_try_connect_group(struct p2p_device *dev)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l_steal_ptr(hs);
|
||||||
dev->conn_retry_count++;
|
dev->conn_retry_count++;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@ -1570,9 +1571,6 @@ done:
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
not_supported:
|
not_supported:
|
||||||
if (hs)
|
|
||||||
handshake_state_free(hs);
|
|
||||||
|
|
||||||
p2p_connect_failed(dev);
|
p2p_connect_failed(dev);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user