Fix memory leaks when creating test hierarchy
authorRicardo Garcia <rgarcia@igalia.com>
Mon, 28 Mar 2022 13:40:57 +0000 (15:40 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 1 Apr 2022 15:34:50 +0000 (15:34 +0000)
The lack of a virtual destructor in one of the classes used as part of
some test parameters made createDescriptorValveMutableTests() leak
memory whenever it was called, in the moment the test hierarchy is being
destroyed. The leak will happen not only when running mutable descriptor
test, but when the binding_model test group needs to be generated for
any reason, including running tests in adjacent groups.

Hence, the change has no specific list of affected tests. At the same
time, no test result should be affected by the change.

Components: Vulkan
VK-GL-CTS issue: 3583

Change-Id: I7e847b5927359cef27f9992cd53991dd1a7cb781

external/vulkancts/modules/vulkan/binding_model/vktBindingValveMutableTests.cpp

index d2f1da8..653f4d0 100644 (file)
@@ -820,6 +820,8 @@ struct Resource
 
 struct BindingInterface
 {
+       virtual ~BindingInterface () {}
+
        // Minimum number of iterations to test all mutable types.
        virtual deUint32 maxTypes () const = 0;