The open source OpenXR runtime
0
fork

Configure Feed

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

ipc: Don't call teardown if mutex fails to be created

+4 -3
+4 -3
src/xrt/ipc/server/ipc_server_process.c
··· 143 143 144 144 u_process_destroy(s->process); 145 145 146 + ipc_shmem_destroy(&s->ism_handle, (void **)&s->ism, sizeof(struct ipc_shared_memory)); 147 + 148 + // Destroyed last. 146 149 os_mutex_destroy(&s->global_state.lock); 147 - 148 - ipc_shmem_destroy(&s->ism_handle, (void **)&s->ism, sizeof(struct ipc_shared_memory)); 149 150 } 150 151 151 152 static int ··· 465 466 ret = os_mutex_init(&s->global_state.lock); 466 467 if (ret < 0) { 467 468 IPC_ERROR(s, "Global state lock mutex failed to init!"); 468 - teardown_all(s); 469 + // Do not call teardown_all here, os_mutex_destroy will assert. 469 470 return ret; 470 471 } 471 472