Noblis / INVSC-janice

An open API for computer vision algorithms
https://noblis.github.io/janice/
Other
9 stars 4 forks source link

Avert some memory leaks with JaniceErrors: ensure they're empty befor… #57

Closed taa01776 closed 6 years ago

taa01776 commented 6 years ago

…e use, and that they get cleared after use. In the test harness executables that use JaniceErrors structs, make sure they're zeroed out before they get used. The callee could do that, but it's better to be sure that we're in a good state. In addition, the JaniceErrors structures were not getting cleared on return, so would leak memory. Finally, change the loop that reports the errors in the struct so it reports all the errors before (possibly) exiting.