mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
ipc: Fix visibility mask leak
This commit is contained in:
parent
a7787104dd
commit
8bdc2f1edf
|
@ -1588,16 +1588,18 @@ ipc_handle_device_get_visibility_mask(volatile struct ipc_client_state *ics,
|
||||||
xret = ipc_send(imc, &reply, sizeof(reply));
|
xret = ipc_send(imc, &reply, sizeof(reply));
|
||||||
if (xret != XRT_SUCCESS) {
|
if (xret != XRT_SUCCESS) {
|
||||||
IPC_ERROR(s, "Failed to send reply");
|
IPC_ERROR(s, "Failed to send reply");
|
||||||
return xret;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
xret = ipc_send(imc, mask, reply.mask_size);
|
xret = ipc_send(imc, mask, reply.mask_size);
|
||||||
if (xret != XRT_SUCCESS) {
|
if (xret != XRT_SUCCESS) {
|
||||||
IPC_ERROR(s, "Failed to send mask");
|
IPC_ERROR(s, "Failed to send mask");
|
||||||
return xret;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
return XRT_SUCCESS;
|
out_free:
|
||||||
|
free(mask);
|
||||||
|
return xret;
|
||||||
}
|
}
|
||||||
|
|
||||||
xrt_result_t
|
xrt_result_t
|
||||||
|
|
Loading…
Reference in a new issue