Messages in this thread Patch in this message | | | Subject | [PATCH 09/18] autofs: Don't fail to free_dev_ioctl(param) | From | Ian Kent <> | Date | Fri, 12 Aug 2016 10:48:15 +0800 |
| |
From: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Returning -ENOTTY here fails to free dynamically allocated param.
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com> Signed-off-by: Ian Kent <ikent@redhat.com> --- fs/autofs4/dev-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index c7fcc74..d47b35a 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, fn = lookup_dev_ioctl(cmd); if (!fn) { pr_warn("unknown command 0x%08x\n", command); - return -ENOTTY; + err = -ENOTTY; + goto out; } fp = NULL;
| |