anv: Add missing error-checking to anv_CreateDevice (v3)
authorGwan-gyeong Mun <elongbug@gmail.com>
Tue, 29 Nov 2016 21:59:15 +0000 (06:59 +0900)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 14 Mar 2017 04:29:43 +0000 (21:29 -0700)
commit8f22552a4ff40c74c661b5812569c1b1ea388f46
tree6eb8113b37180d4a4be72654bd323b7aba4acbb9
parentb8ee70384adc3286d18febba7a92047118cc0f0f
anv: Add missing error-checking to anv_CreateDevice (v3)

This patch adds missing error-checking and fixes resource leak in
allocation failure path on anv_CreateDevice()

v2: Fixes from Jason Ekstrand's review
  a) Add missing destructors for all of the state pools on allocation
     failure path
  b) Add missing destructor for batch bo pools on allocation failure path

v3: Fixes from Emil Velikov's review
  Add missing destructor for queue and scratch_pool on allocation failure
  path

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c