thisistherk / fast_obj

Fast C OBJ parser
MIT License
636 stars 47 forks source link

Memory leak #32

Open VeganPower opened 2 years ago

VeganPower commented 2 years ago

If the allocation on line fast_obj.h#1450 fails the memory allocated at fast_obj.h#1397 is leaked.

https://github.com/thisistherk/fast_obj/blob/85778da5fc320b7e52885f8e869edc079695cc79/fast_obj.h#L1450

thisistherk commented 2 years ago

Dupe of #30. Happy for someone to have a go at fixing it, but all the array_push calls are a far bigger issue if you care about it failing nicely on out-of-memory.

VeganPower commented 2 years ago

Ah.. sorry, I checked the open issue and I didn't find anything. This was a warning from our static analysis tool and I didn't investigate further. I can give it a try to fix it, but I need approval from my company... and they are slooooooow.