mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
scan: Zero destroy callback in scan_cancel
Otherwise it may be called again in get_scan_done.
This commit is contained in:
parent
6d11ce020a
commit
c6e38dacac
@ -375,8 +375,10 @@ bool scan_cancel(uint32_t ifindex, uint32_t id)
|
|||||||
if (sr->id == id && sr->triggered) {
|
if (sr->id == id && sr->triggered) {
|
||||||
sr->callback = NULL;
|
sr->callback = NULL;
|
||||||
|
|
||||||
if (sr->destroy)
|
if (sr->destroy) {
|
||||||
sr->destroy(sr->userdata);
|
sr->destroy(sr->userdata);
|
||||||
|
sr->destroy = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user