2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

proc_parse: Delay freeing of kernel fs type

We will need it for additional handling once parsing
of mount entry is complete (in particular btrfs requires
additional processing to figure out subvolumes names).

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-11-29 13:34:29 +04:00
committed by Pavel Emelyanov
parent b4266c7e67
commit 654131626e

View File

@@ -759,19 +759,21 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new)
if (ret != 3)
return -1;
ret = 0;
new->fstype = find_fstype_by_name(fstype);
free(fstype);
new->options = xmalloc(strlen(opt) + 1);
if (!new->options)
return -1;
goto err;
if (parse_sb_opt(opt, &new->flags, new->options))
return -1;
goto err;
ret = 0;
err:
free(opt);
return 0;
free(fstype);
return ret;
}
struct mount_info *parse_mountinfo(pid_t pid)