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: 3352f2d746
"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>
This commit is contained in:
parent
55d1a77c29
commit
e43c012433
|
@ -927,8 +927,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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue