mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
frame-xchg: Drop l_io read destroy handler
This function was intended to catch socket errors and destroy the group but it would leak the l_io object if that happened, and if called on ordinary shutdown it could cause a crash. Since we're now assuming that the netlink socket operations never fail just remove it.
This commit is contained in:
parent
e705c4382a
commit
59a7f2e681
@ -361,19 +361,6 @@ static bool frame_watch_group_io_read(struct l_io *io, void *user_data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void frame_watch_group_io_destroy(void *user_data)
|
|
||||||
{
|
|
||||||
struct watch_group *group = user_data;
|
|
||||||
|
|
||||||
group->io = NULL;
|
|
||||||
|
|
||||||
if (l_queue_remove(watch_groups, group)) {
|
|
||||||
l_error("Frame watch group socket closed");
|
|
||||||
|
|
||||||
frame_watch_group_destroy(group);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct watch_group *frame_watch_group_new(uint64_t wdev_id, uint32_t id)
|
static struct watch_group *frame_watch_group_new(uint64_t wdev_id, uint32_t id)
|
||||||
{
|
{
|
||||||
struct watch_group *group = l_new(struct watch_group, 1);
|
struct watch_group *group = l_new(struct watch_group, 1);
|
||||||
@ -435,7 +422,7 @@ static struct watch_group *frame_watch_group_new(uint64_t wdev_id, uint32_t id)
|
|||||||
|
|
||||||
l_io_set_close_on_destroy(group->io, true);
|
l_io_set_close_on_destroy(group->io, true);
|
||||||
l_io_set_read_handler(group->io, frame_watch_group_io_read, group,
|
l_io_set_read_handler(group->io, frame_watch_group_io_read, group,
|
||||||
frame_watch_group_io_destroy);
|
NULL);
|
||||||
group->write_queue = l_queue_new();
|
group->write_queue = l_queue_new();
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
|
Loading…
Reference in New Issue
Block a user