mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
scan: Call .destroy in scan_request_free
The main difference with this is that scan_context removal will also trigger the .destroy calls. Normally there won't be any requests left during scan_context but if there were any we should call destroy on them.
This commit is contained in:
parent
c9d8346d40
commit
0d3f16ec5e
@ -119,6 +119,9 @@ static void scan_request_free(void *data)
|
||||
{
|
||||
struct scan_request *sr = data;
|
||||
|
||||
if (sr->destroy)
|
||||
sr->destroy(sr->userdata);
|
||||
|
||||
l_queue_destroy(sr->cmds, (l_queue_destroy_func_t) l_genl_msg_unref);
|
||||
|
||||
l_free(sr);
|
||||
@ -129,9 +132,6 @@ static void scan_request_trigger_failed(struct scan_request *sr, int err)
|
||||
if (sr->trigger)
|
||||
sr->trigger(err, sr->userdata);
|
||||
|
||||
if (sr->destroy)
|
||||
sr->destroy(sr->userdata);
|
||||
|
||||
scan_request_free(sr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user