evas_gl_font: free data paths if alloca fails

Reviewers: Hermet, woohyun, bu5hm4n, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11473
This commit is contained in:
Ali Alzyod 2020-03-10 11:41:57 +09:00 committed by Hermet Park
parent 5689ce8bfa
commit 794792aacb
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ void *
evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
{
Evas_Engine_GL_Context *gc = context;
Evas_GL_Texture *tex;
Evas_GL_Texture *tex = NULL;
int w, h, nw, fh, y;
DATA8 *ndata, *data, *p1, *p2;
@ -25,7 +25,7 @@ evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
ndata = data;
} else {
ndata = alloca(nw *h);
if (!ndata) return NULL;
if (!ndata) goto done;
// else copy row by row
for (y = 0; y < h; y++)
{