[PATCH weston 1/2] logind: actually close fd in weston_logind_close()
Derek Foreman
derekf at osg.samsung.com
Thu Apr 30 12:33:26 PDT 2015
On 30/04/15 11:27 AM, David Herrmann wrote:
> Hi
>
> On Thu, Apr 30, 2015 at 6:20 PM, Derek Foreman <derekf at osg.samsung.com> wrote:
>> You had one job...
>>
>> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
>> ---
>> src/logind-util.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/src/logind-util.c b/src/logind-util.c
>> index e4e20eb..1327b48 100644
>> --- a/src/logind-util.c
>> +++ b/src/logind-util.c
>> @@ -248,6 +248,8 @@ weston_logind_close(struct weston_logind *wl, int fd)
>>
>> weston_logind_release_device(wl, major(st.st_rdev),
>> minor(st.st_rdev));
>> +
>> + close(fd);
>
> You should really close the FD in the error-paths above, too. Or just
> go to launcher-util.c, weston_launcher_close() and drop the "return"
> before weston_logind_close().
I like dropping the return, I'll do it that way.
Thanks!
> Thanks
> David
>
>> }
>>
>> WL_EXPORT void
>> --
>> 2.1.4
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list