GridDyn
GridDyn copied to clipboard
kinsolInterface::initialize leaks if called multiple times
LS and J are leaked upon successive calls to kinsolInterface::initialize. Additionally, KINInit leaks if called more than once for a given solverMem.
KINInit should be only called when !flags[initialized_flag]
, and LS/J should be freed here (or in sundialsInterface::allocate, where that happens with the other variables sundialsInterface manages).