summaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins
diff options
context:
space:
mode:
authorTobin C. Harding2019-05-13 21:59:04 +0200
committerLinus Torvalds2019-05-14 00:43:01 +0200
commitfbcde197e1befae4228715edf1288c7646808b8b (patch)
treef779a08cbad359a2b34b67327c66e9aedf32a584 /scripts/gcc-plugins
parentMerge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/denni... (diff)
downloadkernel-qcow2-linux-fbcde197e1befae4228715edf1288c7646808b8b.tar.gz
kernel-qcow2-linux-fbcde197e1befae4228715edf1288c7646808b8b.tar.xz
kernel-qcow2-linux-fbcde197e1befae4228715edf1288c7646808b8b.zip
gfs2: Fix error path kobject memory leak
If a call to kobject_init_and_add() fails we must call kobject_put() otherwise we leak memory. Function gfs2_sys_fs_add always calls kobject_init_and_add() which always calls kobject_init(). It is safe to leave object destruction up to the kobject release function and never free it manually. Remove call to kfree() and always call kobject_put() in the error path. Signed-off-by: Tobin C. Harding <tobin@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gcc-plugins')
0 files changed, 0 insertions, 0 deletions