Hi,

On 26 March 2018 at 16:11, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 23 March 2018 at 13:50, Daniel Stone <dani...@collabora.com> wrote:
>> +    for (i = 0; i < 4 && handles[i]; i++) {
>> +        err = drmPrimeHandleToFD(drmmode->fd, handles[i], O_CLOEXEC, 
>> &fds[i]);
>> +        if (err != 0)
>> +            return 0;
> Close the existing fds ones on error?
>
> With the fd leak plugged (regardless of the nit)
> Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

Right you are; it can also be fixed by s/out_free_fb/out_close_fds/ in
the caller's failure path (below the 'Failed to make prime FD for
handle' message).

> Aside: there's plenty of duplication in the area + some partial depth
> <> format mappings.

There sure is, but I decided to leave those as-is for now.

Cheers,
Daniel
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to