diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2017-05-02 20:05:07 +0300 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-05-08 11:24:05 +0100 |
commit | ae9a2c1fc48669441318c158af352deab8bdd709 (patch) | |
tree | 2b341afb179f6c4f8a270833ec47ea5540fb4443 | |
parent | 64b98a1e72e564979590c20c58c610ed529eee2f (diff) | |
download | mesa-ae9a2c1fc48669441318c158af352deab8bdd709.tar.gz mesa-ae9a2c1fc48669441318c158af352deab8bdd709.tar.bz2 mesa-ae9a2c1fc48669441318c158af352deab8bdd709.zip |
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 <notasas@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 8aab792e92d8f7d20a1e34169e8a714291ba1c6f)
-rw-r--r-- | src/amd/vulkan/radv_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 2c44667e873..8654b1e8ab9 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; } |