struct gl_program_parameter_list *
_mesa_new_parameter_list(void)
{
- return (struct gl_program_parameter_list *)
- _mesa_calloc(sizeof(struct gl_program_parameter_list));
+ return CALLOC_STRUCT(gl_program_parameter_list);
}
_mesa_free(shProg->Shaders);
shProg->Shaders = NULL;
}
+
+ if (shProg->InfoLog) {
+ _mesa_free(shProg->InfoLog);
+ shProg->InfoLog = NULL;
+ }
}
_mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg)
{
_mesa_free_shader_program_data(ctx, shProg);
- if (shProg->Shaders) {
- _mesa_free(shProg->Shaders);
- shProg->Shaders = NULL;
- }
+
_mesa_free(shProg);
}