* cppcheck (1.56 dev)
- fixed several resource-/mem-leaks
- fixed alloc/dealloc mismatches
71 lines of code changed in 18 files:
* DI_MATRIX::load
- return outofmem-error (and handle @ callers)
- stuffed memleak on realloc failure
45 lines of code changed in 2 files:
* fixed access via freed pointer
- was hidden by old-style-cast (to cast off const)
- made to_array()/to_list() non-const (instead cast 'this' at one call-site) to get rid of casts
13 lines of code changed in 2 files:
* add realloc_unleaked() - does not leak if realloc fails (just sets ptr to NULL)
* AISC
- replaced problematic realloc's and throw if realloc fails
- add exception handling to main
- check Interpreter was instanciated before accessing it (crashed during early throw)
- cppcheck-suppress two acceptable leaks
35 lines of code changed in 4 files: