summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2020-02-14 13:36:53 +0900
committerHermet Park <hermetpark@gmail.com>2020-02-14 13:39:17 +0900
commit63d1b32e6212fea96033c2c6200805b9ab7e948d (patch)
tree101959516e6a1f92d4f43c93b531e77751efdceb /src/modules
parente64f45a889ad2babf4731163748c10cfbb8c77e2 (diff)
canvas engine: + null check for safety
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 13c6e5fec1..4d145ad69e 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -5487,7 +5487,9 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5487 int i = 0, len = 0; 5487 int i = 0, len = 0;
5488 5488
5489 char **s = malloc(count * sizeof(char*)); 5489 char **s = malloc(count * sizeof(char*));
5490 if (!s) goto err;
5490 GLint *l = malloc(count * sizeof(GLint)); 5491 GLint *l = malloc(count * sizeof(GLint));
5492 if (!l) goto err;
5491 5493
5492 memset(s, 0, count * sizeof(char*)); 5494 memset(s, 0, count * sizeof(char*));
5493 memset(l, 0, count * sizeof(GLint)); 5495 memset(l, 0, count * sizeof(GLint));
@@ -5512,9 +5514,7 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5512 free(s[--i]); 5514 free(s[--i]);
5513 free(l); 5515 free(l);
5514 free(s); 5516 free(s);
5515 5517 goto err;
5516 DBG("Patching Shader Failed.");
5517 return;
5518 } 5518 }
5519 } 5519 }
5520 else 5520 else
@@ -5530,6 +5530,9 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5530 free(s[--i]); 5530 free(s[--i]);
5531 free(l); 5531 free(l);
5532 free(s); 5532 free(s);
5533
5534err:
5535 ERR("Patching Shader Failed.");
5533} 5536}
5534 5537
5535 5538