[CRIU] [PATCH] criu: pagemap: close pagemap image before returning from init_pagemaps
Mike Rapoport
rppt at linux.vnet.ibm.com
Sat Jun 25 22:56:34 PDT 2016
Fix CID 163578 (#1 of 1): Structurally dead code (UNREACHABLE).
The pagemap image would never be closed because of stupid code order in
the original patch (674583f2: criu: page-read: read pagemaps at open time
and keep them in memory).
Fix that.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
criu/pagemap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/pagemap.c b/criu/pagemap.c
index 93eb999..08e3945 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -395,11 +395,11 @@ static int init_pagemaps(struct page_read *pr)
}
}
- return 0;
-
close_image(pr->pmi);
pr->pmi = NULL;
+ return 0;
+
free_pagemaps:
free_pagemaps(pr);
return -1;
--
1.9.1
More information about the CRIU
mailing list