[CRIU] [PATCH 4/5] test/rpc: don't call criu_resp__free_unpacked for NULL

Andrey Vagin avagin at openvz.org
Sun Aug 23 15:26:26 PDT 2015


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/rpc/test-c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/rpc/test-c.c b/test/rpc/test-c.c
index 9ef5778..490a07a 100644
--- a/test/rpc/test-c.c
+++ b/test/rpc/test-c.c
@@ -164,6 +164,7 @@ int main(int argc, char *argv[])
 exit:
 	close(fd);
 	close(dir_fd);
-	criu_resp__free_unpacked(resp, NULL);
+	if (resp)
+		criu_resp__free_unpacked(resp, NULL);
 	return ret;
 }
-- 
2.1.0



More information about the CRIU mailing list