[CRIU] [PATCH 1/4] lazy-pages: use xfree() instead of free()

Mike Rapoport rppt at linux.vnet.ibm.com
Tue May 15 23:42:22 MSK 2018


Although they are the same, xfree() looks more consistent with other code

Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/uffd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/criu/uffd.c b/criu/uffd.c
index f803f2a..e60c782 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -150,7 +150,7 @@ static void lpi_fini(struct lazy_pages_info *lpi)
 {
 	if (!lpi)
 		return;
-	free(lpi->buf);
+	xfree(lpi->buf);
 	free_iovs(lpi);
 	if (lpi->lpfd.fd > 0)
 		close(lpi->lpfd.fd);
@@ -158,7 +158,7 @@ static void lpi_fini(struct lazy_pages_info *lpi)
 		lpi->parent->num_children--;
 	if (!lpi->parent && !lpi->num_children && lpi->pr.close)
 		lpi->pr.close(&lpi->pr);
-	free(lpi);
+	xfree(lpi);
 }
 
 static int prepare_sock_addr(struct sockaddr_un *saddr)
-- 
2.7.4



More information about the CRIU mailing list