anv: don't leak DRM devices
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 2 May 2017 17:11:06 +0000 (20:11 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 9 May 2017 22:13:44 +0000 (01:13 +0300)
After successful drmGetDevices2() call, drmFreeDevices() needs to be
called.

Fixes: b1fb6e8d "anv: do not open random render node(s)"
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> # radv version
src/intel/vulkan/anv_device.c

index a64eae1ac999b3de5444db702bc599e7ed1784b3..35e40301a313766cdee13d902091184aee1a4b52 100644 (file)
@@ -526,6 +526,7 @@ anv_enumerate_devices(struct anv_instance *instance)
             break;
       }
    }
+   drmFreeDevices(devices, max_devices);
 
    if (result == VK_SUCCESS)
       instance->physicalDeviceCount = 1;