[PATCH libdrm] xf86drm: Be sure to closedir before return
Eric Engestrom
eric.engestrom at intel.com
Mon May 21 14:08:27 UTC 2018
On Friday, 2018-05-18 12:48:17 -0700, Kevin Strasser wrote:
> removed in commit bb45ce4e3ac751315bfd7fbfd9e1425bf515ec0d
>
> Adding it back as it is still needed in the case where we don't find a
> match.
>
> Signed-off-by: Kevin Strasser <kevin.strasser at intel.com>
Good catch, thanks!
Fixes: bb45ce4e3ac751315bfd "libdrm: Use readdir instead of readdir_r to
avoid build warnings"
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
... and pushed :)
> ---
> xf86drm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index 3a9d0ed..056dfa4 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -2855,6 +2855,8 @@ static char *drmGetMinorNameForFD(int fd, int type)
> return strdup(dev_name);
> }
> }
> +
> + closedir(sysdir);
> return NULL;
> #else
> struct stat sbuf;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list