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>
macos/master
Gert Wollny 5 years ago
parent 9f764c1ead
commit 522b610a82
  1. 2
      src/vrend_renderer.c

@ -6460,7 +6460,6 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
} else { } else {
vrend_printf( "missing GL_OES_EGL_image_external extensions\n"); vrend_printf( "missing GL_OES_EGL_image_external extensions\n");
glBindTexture(gr->target, 0); glBindTexture(gr->target, 0);
FREE(gr);
return EINVAL; return EINVAL;
} }
} else { } else {
@ -6471,7 +6470,6 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
if (internalformat == 0) { if (internalformat == 0) {
vrend_printf("unknown format is %d\n", pr->format); vrend_printf("unknown format is %d\n", pr->format);
glBindTexture(gr->target, 0); glBindTexture(gr->target, 0);
FREE(gt);
return EINVAL; return EINVAL;
} }

Loading…
Cancel
Save