xf86drm: Be sure to closedir before return

removed in commit bb45ce4e3a

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@intel.com>
Fixes: bb45ce4e3a "libdrm: Use readdir instead of readdir_r to
                             avoid build warnings"$
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
main
Kevin Strasser 2018-05-18 12:48:17 -07:00 committed by Eric Engestrom
parent cb592ac816
commit f34b6942ec
1 changed files with 2 additions and 0 deletions

View File

@ -2855,6 +2855,8 @@ static char *drmGetMinorNameForFD(int fd, int type)
return strdup(dev_name); return strdup(dev_name);
} }
} }
closedir(sysdir);
return NULL; return NULL;
#else #else
struct stat sbuf; struct stat sbuf;