summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-02-25 10:57:24 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-02-25 16:43:25 +0100
commit8ff8aa3076fe319f891c5bd5fdc972c7c1e45451 (patch)
tree2f6a54d20802d81c74383771336ecf8c87aff364 /src
parent9caa31357c395c0576e97eddef17b599b7edc470 (diff)
evas: software_engine: free allocation on error path
When we allocated s but fail to allocate l we need to make sure to free the first allocation before erroring out. CID: 1419874 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11409
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index d2f0381732..674e698bc2 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -5517,7 +5517,11 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5517 char **s = malloc(count * sizeof(char*)); 5517 char **s = malloc(count * sizeof(char*));
5518 if (!s) goto err; 5518 if (!s) goto err;
5519 GLint *l = malloc(count * sizeof(GLint)); 5519 GLint *l = malloc(count * sizeof(GLint));
5520 if (!l) goto err; 5520 if (!l)
5521 {
5522 free(s);
5523 goto err;
5524 }
5521 5525
5522 memset(s, 0, count * sizeof(char*)); 5526 memset(s, 0, count * sizeof(char*));
5523 memset(l, 0, count * sizeof(GLint)); 5527 memset(l, 0, count * sizeof(GLint));