42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From 2426c4e1969bc875064a4c918aac14c8072a37c7 Mon Sep 17 00:00:00 2001
|
|
From: Gert Wollny <gert.wollny@collabora.com>
|
|
Date: Mon, 13 Jan 2020 10:03:19 +0100
|
|
Subject: [PATCH] vrend: Don't free resource struct in
|
|
_resource_allocate_texture
|
|
|
|
The structure is allocated outside this function and also deleted there
|
|
if texture creation failes or it is asserted that it doesn't fail
|
|
for intermediate blitting textures. Therefore, don't free the struct inside
|
|
this function when allocation fails.
|
|
|
|
Closes #154
|
|
|
|
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
|
|
---
|
|
src/vrend_renderer.c | 2 --
|
|
1 file changed, 2 deletions(-)
|
|
|
|
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
|
|
index 4a3b9dc..189372a 100644
|
|
--- a/src/vrend_renderer.c
|
|
+++ b/src/vrend_renderer.c
|
|
@@ -5688,7 +5688,6 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
|
|
|
|
if (internalformat == 0) {
|
|
fprintf(stderr,"unknown format is %d\n", pr->format);
|
|
- FREE(gt);
|
|
return EINVAL;
|
|
}
|
|
|
|
@@ -5697,7 +5696,6 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
|
|
glEGLImageTargetTexture2DOES(gr->target, (GLeglImageOES) image_oes);
|
|
} else {
|
|
fprintf(stderr, "missing GL_OES_EGL_image_external extension\n");
|
|
- FREE(gr);
|
|
return EINVAL;
|
|
}
|
|
} else if (pr->nr_samples > 1) {
|
|
--
|
|
2.27.0
|
|
|