i965/miptree: Set refcount before failing via _release()
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 3 Jul 2017 11:23:35 +0000 (14:23 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Tue, 18 Jul 2017 18:35:03 +0000 (21:35 +0300)
commit8fd18642e78858d454eac4581a07f00b9591d9c0
tree094a58c0cb35ea792d5b4e4df8ea9f65ee71a68a
parentc2bb39d8d6eaf391d917db94ca671a6261800359
i965/miptree: Set refcount before failing via _release()

Otherwise one wraps uint to UINT_MAX via -1.

Fixes: 3cf470f2b6c ("i965: Add isl based miptree creator")
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c