mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +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:
committed by
Pavel Emelyanov
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,
|
&new->mnt_id, &new->parent_mnt_id,
|
||||||
&kmaj, &kmin, &new->root, new->mountpoint + 1,
|
&kmaj, &kmin, &new->root, new->mountpoint + 1,
|
||||||
&opt, &n);
|
&opt, &n);
|
||||||
if (ret != 7) {
|
if (ret != 7)
|
||||||
xfree(new->mountpoint);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
new->mountpoint = xrealloc(new->mountpoint, strlen(new->mountpoint) + 1);
|
new->mountpoint = xrealloc(new->mountpoint, strlen(new->mountpoint) + 1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user