[CRIU] [PATCH v2 2/3] proc parse: remember to free mnt entry if parse() fails

Tycho Andersen tycho.andersen at canonical.com
Tue May 10 14:15:32 PDT 2016


Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 criu/proc_parse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/criu/proc_parse.c b/criu/proc_parse.c
index ec1a7f1..58cb850 100644
--- a/criu/proc_parse.c
+++ b/criu/proc_parse.c
@@ -1390,6 +1390,8 @@ struct mount_info *parse_mountinfo(pid_t pid, struct ns_id *nsid, bool for_dump)
 			if (ret) {
 				pr_err("Failed to parse FS specific data on %s\n",
 						new->mountpoint);
+				mnt_entry_free(new);
+				new = NULL;
 				goto end;
 			}
 		}
-- 
2.7.4



More information about the CRIU mailing list