i965/miptree: Don't leak the clear_color_bo

Free the clear_color_bo in addition to freeing the
intel_miptree_aux_buffer which holds the reference to it.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Nanley Chery 2018-04-09 11:27:08 -07:00
parent 9d2ef3c9ec
commit 010abacc95
1 changed files with 1 additions and 2 deletions

View File

@ -2877,8 +2877,7 @@ intel_miptree_make_shareable(struct brw_context *brw,
ISL_AUX_USAGE_NONE, false);
if (mt->mcs_buf) {
brw_bo_unreference(mt->mcs_buf->bo);
free(mt->mcs_buf);
intel_miptree_aux_buffer_free(mt->mcs_buf);
mt->mcs_buf = NULL;
/* Any pending MCS/CCS operations are no longer needed. Trying to