Currently, process_singlesync_signals() checks if fd == -1 to handle
possible errors in the drmSyncobjExportSyncFile function. But, fd is not
initialized, which means that drmSyncobjExportSyncFile might fail and
the error will not be handled as fd might not be equal to -1.
Therefore, initialize the fd variable with value -1 to ensure proper
error handling.
cc: mesa-stable
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20475>
(cherry picked from commit
a2252adde8235d5c4d78d9347527cd7914bb905a)
"description": "v3dv: initialize fd variable for proper error handling",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
if (device->pdevice->caps.multisync)
return VK_SUCCESS;
- int fd;
+ int fd = -1;
drmSyncobjExportSyncFile(device->pdevice->render_fd,
queue->last_job_syncs.syncs[V3DV_QUEUE_ANY],
&fd);