The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correctly destroy the muti-localspace

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2249>

Shijian 47ff8dff f935fa94

+7 -6
+2 -2
src/xrt/auxiliary/util/u_space_overseer.c
··· 836 836 u_hashmap_int_destroy(&uso->xdev_map); 837 837 838 838 for (int id = 0; id < XRT_MAX_CLIENT_SPACES; id++) { 839 - struct xrt_space *xslocal = xso->localspace[id]; 840 - xrt_space_reference(&xslocal, NULL); 839 + struct xrt_space **xslocal_ptr = (struct xrt_space **)&xso->localspace[id]; 840 + xrt_space_reference(xslocal_ptr, NULL); 841 841 } 842 842 843 843 pthread_rwlock_destroy(&uso->lock);
+3 -2
src/xrt/ipc/server/ipc_server_handler.c
··· 703 703 xrt_space_reference(xs_ptr, NULL); 704 704 705 705 if (space_id == ics->local_space_index) { 706 - struct xrt_space *xslocal_ptr = ics->server->xso->localspace[ics->local_space_overseer_index]; 707 - xrt_space_reference(&xslocal_ptr, NULL); 706 + struct xrt_space **xslocal_ptr = 707 + (struct xrt_space **)&ics->server->xso->localspace[ics->local_space_overseer_index]; 708 + xrt_space_reference(xslocal_ptr, NULL); 708 709 } 709 710 710 711 return XRT_SUCCESS;
+2 -2
src/xrt/ipc/server/ipc_server_per_client_thread.c
··· 68 68 } 69 69 70 70 if (ics->local_space_overseer_index < IPC_MAX_CLIENT_SPACES && ics->local_space_overseer_index >= 0) { 71 - struct xrt_space *xslocal = ics->server->xso->localspace[ics->local_space_overseer_index]; 72 - xrt_space_reference(&xslocal, NULL); 71 + xrt_space_reference((struct xrt_space **)&ics->server->xso->localspace[ics->local_space_overseer_index], 72 + NULL); 73 73 } 74 74 75 75 // Mark an still in use reference spaces as no longer used.