Fix memory leak

This commit is contained in:
hasufell 2014-05-13 21:43:56 +02:00
parent c6e84bb7f5
commit 7650f83c36
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -481,8 +481,10 @@ void delete_object(HE_obj *obj)
if (!obj)
return;
for (uint32_t i = 0; i < obj->vc; i++)
for (uint32_t i = 0; i < obj->vc; i++) {
free(obj->vertices[i].vec);
free(obj->vertices[i].edge_array);
}
free(obj->edges);
free(obj->vertices);
free(obj->faces);