diff options
author | Tomohiro Kusumi <kusumi.tomohiro@gmail.com> | 2016-10-11 16:52:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 18:06:31 -0400 |
commit | 41a4497a4f786a83292ac40a0a39f75c6c4de722 (patch) | |
tree | 143d2f82e52590f14fe6c5808e2a64dc5d7071f4 /fs/autofs4 | |
parent | eea618e6d5a819f2a739d441efccc444e57e68c2 (diff) |
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/dev-ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index c7fcc7438843..d47b35a669e1 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -662,7 +662,8 @@ static int _autofs_dev_ioctl(unsigned int command, | |||
662 | fn = lookup_dev_ioctl(cmd); | 662 | fn = lookup_dev_ioctl(cmd); |
663 | if (!fn) { | 663 | if (!fn) { |
664 | pr_warn("unknown command 0x%08x\n", command); | 664 | pr_warn("unknown command 0x%08x\n", command); |
665 | return -ENOTTY; | 665 | err = -ENOTTY; |
666 | goto out; | ||
666 | } | 667 | } |
667 | 668 | ||
668 | fp = NULL; | 669 | fp = NULL; |