Commit 4635b538 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

autofs: free leaked opts in autofs_mount

Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 33081348
......@@ -866,7 +866,7 @@ int autofs_mount(struct mount_info *mi, const char *source, const
if (mount(source, mi->mountpoint, filesystemtype, mountflags, opts) < 0) {
pr_perror("Failed to mount autofs to %s", mi->mountpoint);
goto close_pipe;
goto free_opts;
}
info = xmalloc(sizeof(*info));
......@@ -905,6 +905,8 @@ int autofs_mount(struct mount_info *mi, const char *source, const
mi->private = info;
free_opts:
free(opts);
close_pipe:
close(control_pipe[1]);
close(control_pipe[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment