anv: Check that in_fence fd is valid before closing it.
Probably harmless, but will overwrite errno with a failure status
code. Reported by coverity.
CID 1416600: Argument cannot be negative (NEGATIVE_RETURNS)
Fixes: 5c4e4932e0
(anv: Implement support for exporting semaphores as FENCE_FD)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
7ca124a6a3
commit
e29ccaac29
|
@ -1571,6 +1571,7 @@ anv_cmd_buffer_execbuf(struct anv_device *device,
|
|||
result = anv_device_execbuf(device, &execbuf.execbuf, execbuf.bos);
|
||||
|
||||
/* Execbuf does not consume the in_fence. It's our job to close it. */
|
||||
if (in_fence != -1)
|
||||
close(in_fence);
|
||||
|
||||
for (uint32_t i = 0; i < num_in_semaphores; i++) {
|
||||
|
|
Loading…
Reference in New Issue