glsl2 main: Switch from realloc to talloc_realloc to construct program source.
authorCarl Worth <cworth@cworth.org>
Thu, 24 Jun 2010 02:09:56 +0000 (19:09 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 24 Jun 2010 02:09:56 +0000 (19:09 -0700)
This closes 1 leak in the glsl-orangebook-ch06-bump.frag test leaving
4 to go, (all of which are inside hash_table.c).

main.cpp

index dfed4a30e830671e5f043df459e30e9bf7db3610..dcd9bd69c0cf1c79dcedbcd5d8d785819af0dbc8 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -206,8 +206,8 @@ main(int argc, char **argv)
 
    for (/* empty */; argc > optind; optind++) {
       whole_program->Shaders = (struct glsl_shader **)
-        realloc(whole_program->Shaders,
-                sizeof(struct glsl_shader *) * (whole_program->NumShaders + 1));
+        talloc_realloc(whole_program, whole_program->Shaders,
+                       struct glsl_shader *, whole_program->NumShaders + 1);
       assert(whole_program->Shaders != NULL);
 
       struct glsl_shader *shader = talloc_zero(whole_program, glsl_shader);