Commit 65413162 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b4266c7e
......@@ -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)
......
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