From: Grazvydas Ignotas Date: Tue, 2 May 2017 17:05:07 +0000 (+0300) Subject: radv: don't leak DRM devices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8aab792e92d8f7d20a1e34169e8a714291ba1c6f;p=mesa.git radv: don't leak DRM devices After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: 743315f2 "radv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 9e66faf7ab8..648103d2c79 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -417,9 +417,11 @@ radv_enumerate_devices(struct radv_instance *instance) if (result == VK_SUCCESS) ++instance->physicalDeviceCount; else if (result != VK_ERROR_INCOMPATIBLE_DRIVER) - return result; + break; } } + drmFreeDevices(devices, max_devices); + return result; }