From: Grazvydas Ignotas Date: Tue, 2 May 2017 17:11:06 +0000 (+0300) Subject: anv: don't leak DRM devices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ef302638f2883789a3b39c2b6cfd20814efa0bb;p=mesa.git anv: don't leak DRM devices After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: b1fb6e8d "anv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas Reviewed-by: Bas Nieuwenhuizen # radv version --- diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index a64eae1ac99..35e40301a31 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -526,6 +526,7 @@ anv_enumerate_devices(struct anv_instance *instance) break; } } + drmFreeDevices(devices, max_devices); if (result == VK_SUCCESS) instance->physicalDeviceCount = 1;