mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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>
(cherry picked from commit e43c012433)
This commit is contained in:
parent
98dfe161b0
commit
0de0b5c406
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue