mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
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: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
b66728ef14
commit
8b5faee7c6
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user