3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-06 11:28:38 +02:00

scan: Zero destroy callback in scan_cancel

Otherwise it may be called again in get_scan_done.
This commit is contained in:
Andrew Zaborowski 2016-09-21 18:54:53 +02:00 committed by Denis Kenzior
parent 6d11ce020a
commit c6e38dacac

View File

@ -375,8 +375,10 @@ bool scan_cancel(uint32_t ifindex, uint32_t id)
if (sr->id == id && sr->triggered) {
sr->callback = NULL;
if (sr->destroy)
if (sr->destroy) {
sr->destroy(sr->userdata);
sr->destroy = NULL;
}
return true;
}