summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_font.c
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-03-10 11:41:57 +0900
committerHermet Park <chuneon.park@samsung.com>2020-03-10 11:42:31 +0900
commit794792aacbbf0f693ef9178cb71db16547214ff8 (patch)
tree110a84cec9dee8601813637afc66d8ff6f38ad89 /src/modules/evas/engines/gl_common/evas_gl_font.c
parent5689ce8bfabcd8cf222038183d5e79ec70b53585 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_font.c b/src/modules/evas/engines/gl_common/evas_gl_font.c
index b7bd643756..52e4d4e4a9 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_font.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_font.c
@@ -4,7 +4,7 @@ void *
4evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) 4evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
5{ 5{
6 Evas_Engine_GL_Context *gc = context; 6 Evas_Engine_GL_Context *gc = context;
7 Evas_GL_Texture *tex; 7 Evas_GL_Texture *tex = NULL;
8 int w, h, nw, fh, y; 8 int w, h, nw, fh, y;
9 DATA8 *ndata, *data, *p1, *p2; 9 DATA8 *ndata, *data, *p1, *p2;
10 10
@@ -25,7 +25,7 @@ evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
25 ndata = data; 25 ndata = data;
26 } else { 26 } else {
27 ndata = alloca(nw *h); 27 ndata = alloca(nw *h);
28 if (!ndata) return NULL; 28 if (!ndata) goto done;
29 // else copy row by row 29 // else copy row by row
30 for (y = 0; y < h; y++) 30 for (y = 0; y < h; y++)
31 { 31 {