2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

restore: don't add unneeded vma with zero start and end addresses

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2012-11-20 20:39:03 +04:00 committed by Pavel Emelyanov
parent ec583c7408
commit d5bc93e68b

View File

@ -194,12 +194,13 @@ static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
if (!vma)
break;
(*nr_vmas)++;
list_add_tail(&vma->list, vmas);
ret = pb_read_one_eof(fd, &e, PB_VMAS);
if (ret <= 0)
break;
(*nr_vmas)++;
list_add_tail(&vma->list, vmas);
if (e->fd != -1) {
ret = -1;
pr_err("Error in vma->fd setting (%Ld)\n",