[PATCH libdrm] xf86drm: Fix error handling for drmGetDevices()

2015-10-02 Thread Emil Velikov
On 1 October 2015 at 16:59, Matt Roper wrote: > On Thu, Oct 01, 2015 at 11:12:34AM +0100, Emil Velikov wrote: >> Hi Matt, >> >> On 30 September 2015 at 17:30, Matt Roper >> wrote: >> > If the opendir() call in drmGetDevices() returns failure, we jump to an >> > error label that calls closedir()

[PATCH libdrm] xf86drm: Fix error handling for drmGetDevices()

2015-10-01 Thread Emil Velikov
Hi Matt, On 30 September 2015 at 17:30, Matt Roper wrote: > If the opendir() call in drmGetDevices() returns failure, we jump to an > error label that calls closedir() and then returns. However this means > that we're calling closedir(NULL) which may not be safe on all > implementations. We

[PATCH libdrm] xf86drm: Fix error handling for drmGetDevices()

2015-10-01 Thread Matt Roper
On Thu, Oct 01, 2015 at 11:12:34AM +0100, Emil Velikov wrote: > Hi Matt, > > On 30 September 2015 at 17:30, Matt Roper > wrote: > > If the opendir() call in drmGetDevices() returns failure, we jump to an > > error label that calls closedir() and then returns. However this means > > that we're

[PATCH libdrm] xf86drm: Fix error handling for drmGetDevices()

2015-09-30 Thread Matt Roper
If the opendir() call in drmGetDevices() returns failure, we jump to an error label that calls closedir() and then returns. However this means that we're calling closedir(NULL) which may not be safe on all implementations. We are also leaking the local_devices array that was allocated before the