mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 10:12:24 +00:00
mainloop: make sure that descr->ring is allocated
This is future proofing more than anything else. Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
747bc634c5
commit
aac3f106ff
@ -515,8 +515,10 @@ void lxc_mainloop_close(struct lxc_async_descr *descr)
|
|||||||
|
|
||||||
if (descr->type == LXC_MAINLOOP_IO_URING) {
|
if (descr->type == LXC_MAINLOOP_IO_URING) {
|
||||||
#if HAVE_LIBURING
|
#if HAVE_LIBURING
|
||||||
io_uring_queue_exit(descr->ring);
|
if (descr->ring) {
|
||||||
munmap(descr->ring, sizeof(struct io_uring));
|
io_uring_queue_exit(descr->ring);
|
||||||
|
munmap(descr->ring, sizeof(struct io_uring));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
ERROR("Unsupported io_uring mainloop");
|
ERROR("Unsupported io_uring mainloop");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user