Mesa (staging/19.2): iris: Don't leak the resource for unsupported modifier
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 29 15:19:42 UTC 2019
Module: Mesa
Branch: staging/19.2
Commit: 8cb1070ea3c7ea3b55d3a13b62443b8dbd3f16e2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cb1070ea3c7ea3b55d3a13b62443b8dbd3f16e2
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Wed Sep 25 12:48:57 2019 -0700
iris: Don't leak the resource for unsupported modifier
Make sure the res struct is free'd before returning.
Fixes: 2dce0e94a3d ("iris: Initial commit of a new 'iris' driver for Intel Gen8+ GPUs.")
Reviewed-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
(cherry picked from commit f2fc5dece93019f0bab203247985cf350d541156)
---
src/gallium/drivers/iris/iris_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 53ecb805840..71f92baab49 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -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. */
More information about the mesa-commit
mailing list