diff options
author | Tobin C. Harding <tobin@kernel.org> | 2019-04-30 10:11:44 +1000 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-04-30 07:57:23 +0200 |
commit | 9a4f26cc98d81b67ecc23b890c28e2df324e29f3 (patch) | |
tree | d121e33139a3a521e51a595d86675f108f3cb945 /mm | |
parent | 37624b58542fb9f2d9a70e6ea006ef8a5f66c30b (diff) |
sched/cpufreq: Fix kobject memleak
Currently the error return path from kobject_init_and_add() is not
followed by a call to kobject_put() - which means we are leaking
the kobject.
Fix it by adding a call to kobject_put() in the error path of
kobject_init_and_add().
Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tobin C. Harding <tobin@kernel.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Link: http://lkml.kernel.org/r/20190430001144.24890-1-tobin@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions