[CRIU] [PATCH] make lpi_fini handle NULL to allow it after failed lpi_init in ud_open

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Jul 21 04:37:13 PDT 2016


https://github.com/xemul/criu/issues/187
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 criu/uffd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/criu/uffd.c b/criu/uffd.c
index 8fe8e18..f885424 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -76,6 +76,8 @@ static struct lazy_pages_info *lpi_init(void)
 
 static void lpi_fini(struct lazy_pages_info *lpi)
 {
+	if (!lpi)
+		return;
 	if (lpi->uffd > 0)
 		close(lpi->uffd);
 	if (lpi->pr.close)
-- 
2.5.5



More information about the CRIU mailing list