[PATCH weston 1/2] logind: actually close fd in weston_logind_close()

David Herrmann dh.herrmann at gmail.com
Thu Apr 30 09:27:20 PDT 2015


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().

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