forked from enlightenment/efl
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:
parent
5689ce8bfa
commit
794792aacb
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue