mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 04:33:49 +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
1 changed files with 1 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue