From: Donghwa Jeong Date: Tue, 19 Jun 2018 01:37:47 +0000 (+0900) Subject: fix pointer c is dereferenced after checking null X-Git-Tag: lxc-2.0.10~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3d67822f349361eb1541125340b480f06e08a03;p=thirdparty%2Flxc.git fix pointer c is dereferenced after checking null Signed-off-by: Donghwa Jeong --- diff --git a/src/tests/get_item.c b/src/tests/get_item.c index f009344d2..4a67246c4 100644 --- a/src/tests/get_item.c +++ b/src/tests/get_item.c @@ -321,7 +321,10 @@ int main(int argc, char *argv[]) printf("All get_item tests passed\n"); ret = EXIT_SUCCESS; out: - c->destroy(c); - lxc_container_put(c); + if (c) { + c->destroy(c); + lxc_container_put(c); + } + exit(ret); }