Commit 5bf9f9b6 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Andrei Vagin

remap: don't free rpath and don't shfree_last gf

a) As we shmalloced rpath it can not be xfreed. b) As we shmalloc
variables in collect_remap_ghost() far away from open_remap_ghost()
where we want to free them, there is no guaranty that our shmalloc was
last and we can't use shfree_last().

fixes commit 0c675a5e ("files: remove link_remaps when everything
has been restored")

When create_ghost() fails for some reason that produces a segfault for me.
Signed-off-by: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 0131a851
...@@ -466,8 +466,6 @@ close_ifd: ...@@ -466,8 +466,6 @@ close_ifd:
err: err:
if (gfe) if (gfe)
ghost_file_entry__free_unpacked(gfe, NULL); ghost_file_entry__free_unpacked(gfe, NULL);
xfree(gf->remap.rpath);
shfree_last(gf);
return -1; return -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