* [patch 037/102] autofs: don't fail to free_dev_ioctl(param)
@ 2016-10-11 20:52 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-10-11 20:52 UTC (permalink / raw)
To: torvalds, mm-commits, akpm, kusumi.tomohiro, ikent
From: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Subject: autofs: don't fail to free_dev_ioctl(param)
Returning -ENOTTY here fails to free dynamically allocated param.
Link: http://lkml.kernel.org/r/20160812024815.12352.69153.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Ian Kent <ikent@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/autofs4/dev-ioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN fs/autofs4/dev-ioctl.c~autofs-dont-fail-to-free_dev_ioctlparam fs/autofs4/dev-ioctl.c
--- a/fs/autofs4/dev-ioctl.c~autofs-dont-fail-to-free_dev_ioctlparam
+++ a/fs/autofs4/dev-ioctl.c
@@ -662,7 +662,8 @@ static int _autofs_dev_ioctl(unsigned in
fn = lookup_dev_ioctl(cmd);
if (!fn) {
pr_warn("unknown command 0x%08x\n", command);
- return -ENOTTY;
+ err = -ENOTTY;
+ goto out;
}
fp = NULL;
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-11 20:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 20:52 [patch 037/102] autofs: don't fail to free_dev_ioctl(param) akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).