Unverified Commit a3d67822 by Donghwa Jeong Committed by Christian Brauner

fix pointer c is dereferenced after checking null

parent 743a2994
...@@ -321,7 +321,10 @@ int main(int argc, char *argv[]) ...@@ -321,7 +321,10 @@ int main(int argc, char *argv[])
printf("All get_item tests passed\n"); printf("All get_item tests passed\n");
ret = EXIT_SUCCESS; ret = EXIT_SUCCESS;
out: out:
c->destroy(c); if (c) {
lxc_container_put(c); c->destroy(c);
lxc_container_put(c);
}
exit(ret); exit(ret);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment