mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-21 09:10:10 +00:00
autofs: free leaked opts in autofs_mount
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
3308134849
commit
4635b53846
1 changed files with 3 additions and 1 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue