fix pointer c is dereferenced after checking null

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