anv/meta: Stop leaking renderpass and framebuffer
authorChad Versace <chad.versace@intel.com>
Fri, 15 Jan 2016 18:07:16 +0000 (10:07 -0800)
committerChad Versace <chad.versace@intel.com>
Fri, 15 Jan 2016 18:14:07 +0000 (10:14 -0800)
src/vulkan/anv_meta_clear.c

index fd401bc968e1e979e360d5191bde51ab5e2babc3..34087804075edbccf38d7e8d192e0467a8c59d9a 100644 (file)
@@ -932,8 +932,10 @@ anv_cmd_clear_image(VkCommandBuffer cmd_buffer_h,
                VK_SUBPASS_CONTENTS_INLINE);
 
             ANV_CALL(CmdEndRenderPass)(cmd_buffer_h);
-
-            /* XXX: We're leaking the render pass and framebuffer */
+            ANV_CALL(DestroyRenderPass)(device_h, pass,
+                                        &cmd_buffer->pool->alloc);
+            ANV_CALL(DestroyFramebuffer)(device_h, fb,
+                                         &cmd_buffer->pool->alloc);
          }
       }
    }