[CRIU] [PATCH 4/4] autofs: free leaked opts in autofs_mount
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Mar 24 04:32:22 PDT 2016
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
criu/autofs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/criu/autofs.c b/criu/autofs.c
index 975631c..8befc62 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -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]);
More information about the CRIU
mailing list