tests: Destroy buffer before freeing memory.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index fecc737..673a623 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -3089,8 +3089,8 @@
     Draw(1, 0, 0, 0);
     m_errorMonitor->VerifyFound();
 
-    vkFreeMemory(m_device->device(), mem, NULL);
     vkDestroyBuffer(m_device->device(), dyub, NULL);
+    vkFreeMemory(m_device->device(), mem, NULL);
 
     vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL);
     vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL);