summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-05-02 20:05:07 +0300
committerGrazvydas Ignotas <[email protected]>2017-05-03 22:04:52 +0300
commit8aab792e92d8f7d20a1e34169e8a714291ba1c6f (patch)
tree52b022b393940bf475dea6c2ac54167ae9709120 /src/amd/vulkan/radv_device.c
parent898cbb491b3c02697f006d175d5689893bdf929b (diff)
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 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c4
1 files changed, 3 insertions, 1 deletions
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;
}