Unverified Commit f6b5182f by Donghwa Jeong Committed by Christian Brauner

fix pointer c is dereferenced after checking null

parent 0314007a
...@@ -555,7 +555,10 @@ int main(int argc, char *argv[]) ...@@ -555,7 +555,10 @@ int main(int argc, char *argv[])
printf("All get_item tests passed\n"); printf("All get_item tests passed\n");
fret = EXIT_SUCCESS; fret = EXIT_SUCCESS;
out: out:
if (c) {
c->destroy(c); c->destroy(c);
lxc_container_put(c); lxc_container_put(c);
}
exit(fret); exit(fret);
} }
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