diff options
author | Eric Engestrom <eric@engestrom.ch> | 2018-06-10 18:42:45 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-06-11 10:08:30 -0700 |
commit | 0de0b5c4063ae16aa5ed4c5ba5cebbe4c565ff2d (patch) | |
tree | 108241bd725bb67a9b0635d4a977e391cb86e74f /src | |
parent | 98dfe161b0c76d12f4276382a821be3ef1524896 (diff) |
i965: fix resource leak
v2: intel_miptree_release() already takes care of the planes, no need
to hand-code the loop (Lionel)
Coverity ID: 1436909
Fixes: 3352f2d746d3959b22ca4 "i965: Create multiple miptrees for planar YUV images"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
(cherry picked from commit e43c012433186481219146a988cf2dbc15352802)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 625808a935..af67191b98 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -915,8 +915,10 @@ miptree_create_for_planar_image(struct brw_context *brw, image->strides[index], tiling, MIPTREE_CREATE_NO_AUX); - if (mt == NULL) + if (mt == NULL) { + intel_miptree_release(&planar_mt); return NULL; + } mt->target = target; |