On Wed, Nov 30, 2022 at 06:04:31PM -0500, Xin Long wrote: > After commit 9ed7bfc79542 ("sctp: fix memory leak in > sctp_stream_outq_migrate()"), sctp_sched_set_sched() is the only > place calling sched->free(), and it can actually be replaced by > sched->free_sid() on each stream, and yet there's already a loop > to traverse all streams in sctp_sched_set_sched(). > > This patch adds a function sctp_sched_free_sched() where it calls > sched->free_sid() for each stream to replace sched->free() calls > in sctp_sched_set_sched() and then deletes the unused free member > from struct sctp_sched_ops. > > Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>