commit c21b5df24322460a06fae21b68bf8943eb15f901
parent ed4bbacca6aeb3c63ea9319ec4131057dd6a6fee
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 24 Jul 2015 14:24:23 +0200
Fix an invalid memory read issue
The free list of shape/instance names was released *after* the
deallocation of the device that owns this list. This is of course
totally wrong and would have lead to strong memory corruptions.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/s3d_device.c b/src/s3d_device.c
@@ -50,8 +50,8 @@ device_release(ref_T* ref)
struct s3d_device* dev;
ASSERT(ref);
dev = CONTAINER_OF(ref, struct s3d_device, ref);
- MEM_RM(dev->allocator, dev);
flist_name_release(&dev->names);
+ MEM_RM(dev->allocator, dev);
rtcExit();
ATOMIC_SET(&g_EmbreeIsInitialized, 0);
}