mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
gl: fix leaks
As the relevant variables are initialized to 0/NULL, we can loop over the full range and make sure we free partial allocations when an error happens partway through initialization.
This commit is contained in:
parent
4ecffcf76b
commit
7de81a33ca
1 changed files with 1 additions and 1 deletions
|
@ -556,7 +556,7 @@ mem_error:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (GST_CAT_DEFAULT, "Failed to create EGLImage");
|
GST_ERROR_OBJECT (GST_CAT_DEFAULT, "Failed to create EGLImage");
|
||||||
|
|
||||||
for (i = 0; i < n_mem; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (client_buffer_tex[i])
|
if (client_buffer_tex[i])
|
||||||
gst_gl_context_del_texture (ctx, (GLuint *) & client_buffer_tex[i]);
|
gst_gl_context_del_texture (ctx, (GLuint *) & client_buffer_tex[i]);
|
||||||
if (mem[i])
|
if (mem[i])
|
||||||
|
|
Loading…
Reference in a new issue