Workbench: Fix memleaks.

This commit is contained in:
Clément Foucault 2018-06-03 15:26:53 +02:00
parent d0f7ab27a8
commit 4c4eb1ce20
2 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,7 @@ static void ensure_deferred_shaders(WORKBENCH_PrivateData *wpd, int index, int d
if (drawtype == OB_SOLID && !is_hair) {
e_data.composite_sh_cache[index] = DRW_shader_create_fullscreen(composite_frag, defines);
}
MEM_freeN(prepass_vert);
MEM_freeN(prepass_frag);
MEM_freeN(composite_frag);
MEM_freeN(defines);

View File

@ -316,6 +316,7 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
MEM_freeN(forward_vert);
MEM_freeN(forward_depth_frag);
MEM_freeN(defines);
MEM_freeN(defines_hair);
}
select_forward_shaders(wpd);