summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergii Romantsov <sergii.romantsov@globallogic.com>2019-05-24 15:24:54 +0300
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2019-06-10 09:59:06 +0000
commitbf9f362df40fcf1491e4383c6713eb7de61571e3 (patch)
tree6cd3f3d3c04d122c44d2d8581f0513829f9c8bc8
parent8eec9d95632ecef93865a2c5da7f885daf51166d (diff)
test/textureGather: memory leak
Test uses asprintf which allocates memory, but not freed it Fixes: f62e74f61b39(ARB_texture_gather: add initial execution test) Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
-rw-r--r--tests/texturing/shaders/textureGather.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/texturing/shaders/textureGather.c b/tests/texturing/shaders/textureGather.c
index fd3d101c8..346bcb37b 100644
--- a/tests/texturing/shaders/textureGather.c
+++ b/tests/texturing/shaders/textureGather.c
@@ -426,7 +426,7 @@ do_shader_setup(void)
{
GLint prog;
GLint sampler_loc, offset_loc;
- char *vs_code, *fs_code;
+ char *vs_code = NULL, *fs_code = NULL;
char *offset_coords;
char *prefix[] = { "" /* unorm */, "" /* float */, "i" /* int */, "u" /* uint */, "" /* shadow */ };
char *scale[] = {
@@ -550,6 +550,8 @@ do_shader_setup(void)
offset_loc = glGetUniformLocation(prog, "o2");
glUniform2i(offset_loc, 0, max_offset);
}
+ free(vs_code);
+ free(fs_code);
}
static void