diff --git a/test/rpc/test-c.c b/test/rpc/test-c.c index 9ef577848..490a07a4f 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; }