Commit fb7855a6 authored by Kaushlendra Kumar's avatar Kaushlendra Kumar Committed by Paul E. McKenney
Browse files

refperf: Remove redundant kfree() after torture_stop_kthread()



Remove unnecessary kfree(main_task) call in ref_scale_cleanup() as
torture_stop_kthread() already handles the memory cleanup for the
task structure internally.

The additional kfree(main_task) call after torture_stop_kthread()
is redundant and confusing since torture_stop_kthread() sets the
pointer to NULL, making this a no-op.

This pattern is consistent with other torture test modules where
torture_stop_kthread() is called without explicit kfree() of the
task pointer, as the torture framework manages the task lifecycle
internally.

Signed-off-by: default avatarKaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 9a0352dd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1135,7 +1135,6 @@ ref_scale_cleanup(void)
	kfree(reader_tasks);

	torture_stop_kthread("main_task", main_task);
	kfree(main_task);

	// Do scale-type-specific cleanup operations.
	if (cur_ops->cleanup != NULL)