Browse Source

iris: Don't leak the resource for unsupported modifier

Make sure the res struct is free'd before returning.

Fixes: 2dce0e94a3 ("iris: Initial commit of a new 'iris' driver for Intel Gen8+ GPUs.")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit f2fc5dece9)
tags/mesa-19.2.3
Nanley Chery 6 years ago
parent
commit
8cb1070ea3
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/gallium/drivers/iris/iris_resource.c

+ 1
- 1
src/gallium/drivers/iris/iris_resource.c View File

@@ -717,7 +717,7 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
} else {
if (modifiers_count > 0) {
fprintf(stderr, "Unsupported modifier, resource creation failed.\n");
return NULL;
goto fail;
}

/* No modifiers - we can select our own tiling. */

Loading…
Cancel
Save