layers: GH1720 Migrate swapchain queue checks

fixes #1720
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 92e812f..4974da1 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -10061,9 +10061,9 @@
 
     VkBuffer ib;
     m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
-                                         "vkCreateBuffer: pCreateInfo->pQueueFamilyIndices[0] (777) must be one of the indices "
-                                         "specified when the device was created, via the VkDeviceQueueCreateInfo structure.");
-    vkCreateBuffer(m_device->device(), &buffCI, NULL, &ib);
+                                         "vkCreateBuffer: pCreateInfo->pQueueFamilyIndices[0] (= 777) is not one of the queue "
+                                         "families given via VkDeviceQueueCreateInfo structures when the device was created.");
+    auto err_ib1 = vkCreateBuffer(m_device->device(), &buffCI, NULL, &ib);
     m_errorMonitor->VerifyFound();
 
     if (m_device->queue_props.size() > 2) {
@@ -10100,7 +10100,7 @@
         vkFreeMemory(m_device->device(), mem, NULL);
     }
 
-    vkDestroyBuffer(m_device->device(), ib, NULL);
+    if(!err_ib1) vkDestroyBuffer(m_device->device(), ib, NULL);
 }
 
 TEST_F(VkLayerTest, ExecuteCommandsPrimaryCB) {