procfs: fix error handling of proc_register()
authorDebabrata Banerjee <dbanerje@akamai.com>
Wed, 10 Dec 2014 23:45:04 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:09 +0000 (17:41 -0800)
commitb208d54b75399b276b05f9e70cce8d3a59a42547
tree6fceaa2169ca97be38c6dd7561542194dbca553b
parent710585d4922fd315f2cada8fbe550ae8ed23e994
procfs: fix error handling of proc_register()

proc_register() error paths are leaking inodes and directory refcounts.

Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/generic.c