On 23 January 2017 at 16:14, Nicolai Hähnle wrote:
> I don't think is correct. The incoming handle is in shared_handle, not in
> handle. Once the code block around line 310 has executed, shared_handle is
> the handle produced by drmPrimeFDToHandle, and closing it on error (as
I don't think is correct. The incoming handle is in shared_handle, not
in handle. Once the code block around line 310 has executed,
shared_handle is the handle produced by drmPrimeFDToHandle, and closing
it on error (as the code currently does) should be the correct thing to do.
The only
Do not close the handle if someone else has created it. Afaict there's
no change of ownership implied if the function fails. Thus the caller is
responsible to doing the right thing - trying again, closing the handle
and/or other.
Cc: amd-...@lists.freedesktop.org
Signed-off-by: Emil Velikov