mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
Correctly destroy the muti-localspace
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2249>
This commit is contained in:
parent
f935fa943f
commit
47ff8dfff3
|
@ -836,8 +836,8 @@ destroy(struct xrt_space_overseer *xso)
|
|||
u_hashmap_int_destroy(&uso->xdev_map);
|
||||
|
||||
for (int id = 0; id < XRT_MAX_CLIENT_SPACES; id++) {
|
||||
struct xrt_space *xslocal = xso->localspace[id];
|
||||
xrt_space_reference(&xslocal, NULL);
|
||||
struct xrt_space **xslocal_ptr = (struct xrt_space **)&xso->localspace[id];
|
||||
xrt_space_reference(xslocal_ptr, NULL);
|
||||
}
|
||||
|
||||
pthread_rwlock_destroy(&uso->lock);
|
||||
|
|
|
@ -703,8 +703,9 @@ ipc_handle_space_destroy(volatile struct ipc_client_state *ics, uint32_t space_i
|
|||
xrt_space_reference(xs_ptr, NULL);
|
||||
|
||||
if (space_id == ics->local_space_index) {
|
||||
struct xrt_space *xslocal_ptr = ics->server->xso->localspace[ics->local_space_overseer_index];
|
||||
xrt_space_reference(&xslocal_ptr, NULL);
|
||||
struct xrt_space **xslocal_ptr =
|
||||
(struct xrt_space **)&ics->server->xso->localspace[ics->local_space_overseer_index];
|
||||
xrt_space_reference(xslocal_ptr, NULL);
|
||||
}
|
||||
|
||||
return XRT_SUCCESS;
|
||||
|
|
|
@ -68,8 +68,8 @@ common_shutdown(volatile struct ipc_client_state *ics)
|
|||
}
|
||||
|
||||
if (ics->local_space_overseer_index < IPC_MAX_CLIENT_SPACES && ics->local_space_overseer_index >= 0) {
|
||||
struct xrt_space *xslocal = ics->server->xso->localspace[ics->local_space_overseer_index];
|
||||
xrt_space_reference(&xslocal, NULL);
|
||||
xrt_space_reference((struct xrt_space **)&ics->server->xso->localspace[ics->local_space_overseer_index],
|
||||
NULL);
|
||||
}
|
||||
|
||||
// Mark an still in use reference spaces as no longer used.
|
||||
|
|
Loading…
Reference in a new issue