Commit 8b5faee7 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Pavel Emelyanov

parse_mountinfo_ent: kill the wrong xfree(new->mountpoint)

The caller will do this on failure too. So this is unnecessary and wrong
because we do not nullify ->mountpoint.
Signed-off-by: 's avatarOleg Nesterov <oleg@redhat.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b66728ef
......@@ -958,10 +958,8 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new, char **fsname)
&new->mnt_id, &new->parent_mnt_id,
&kmaj, &kmin, &new->root, new->mountpoint + 1,
&opt, &n);
if (ret != 7) {
xfree(new->mountpoint);
if (ret != 7)
return -1;
}
new->mountpoint = xrealloc(new->mountpoint, strlen(new->mountpoint) + 1);
......
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