Skip to content

Commit

Permalink
autofs: don't fail to free_dev_ioctl(param)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomohiro Kusumi authored and Linus Torvalds committed Oct 11, 2016
1 parent eea618e commit 41a4497
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/autofs4/dev-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ static int _autofs_dev_ioctl(unsigned int command,
fn = lookup_dev_ioctl(cmd);
if (!fn) {
pr_warn("unknown command 0x%08x\n", command);
return -ENOTTY;
err = -ENOTTY;
goto out;
}

fp = NULL;
Expand Down

0 comments on commit 41a4497

Please sign in to comment.