Fix T39843: cycles memory leak rendering with high transparent depth.

This commit is contained in:
Brecht Van Lommel 2014-04-25 15:25:34 +02:00
parent bef1edb322
commit 61eba8fd06

@ -146,10 +146,6 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *
bounce++; bounce++;
} }
/* free dynamic storage */
if(hits != hits_stack)
free(hits);
#ifdef __VOLUME__ #ifdef __VOLUME__
/* attenuation for last line segment towards light */ /* attenuation for last line segment towards light */
if(ps.volume_stack[0].shader != SHADER_NONE) if(ps.volume_stack[0].shader != SHADER_NONE)
@ -158,6 +154,10 @@ ccl_device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *
*shadow *= throughput; *shadow *= throughput;
} }
/* free dynamic storage */
if(hits != hits_stack)
free(hits);
} }
else { else {
Intersection isect; Intersection isect;