********> bugfix.43 Author: Bill Ross Date: 7/30/99 Programs: xleap Severity: Unknown Description: This is an error discovered by a memory use debugger, Purify. It could easily crash the program in the Unit Editor on 'Relax selection'. In the absence of frequent crashes, it appears that there may be no consequence of this bug.. Fix: Make the following change to minimizer.c: ----------------------------------------------------------------------------- *** OLD minimizer.c --- NEW minimizer.c *************** *** 1234,1239 nvDir = nvNVectorCreate( iRestartSteps ); nvNewPos = nvNVectorCreate( iRestartSteps ); nvNewDeriv = nvNVectorCreate( iRestartSteps ); /* Conjugate gradient minimization, evaluate the function */ /* at the current position and use the gradient as the */ --- 1234,1241 ----- nvDir = nvNVectorCreate( iRestartSteps ); nvNewPos = nvNVectorCreate( iRestartSteps ); nvNewDeriv = nvNVectorCreate( iRestartSteps ); + nvTempPos = nvNVectorCreate( iRestartSteps ); + nvTempDeriv = nvNVectorCreate( iRestartSteps ); /* Conjugate gradient minimization, evaluate the function */ /* at the current position and use the gradient as the */ *************** *** 1337,1342 NVectorDestroy( &nvDir ); NVectorDestroy( &nvNewPos ); NVectorDestroy( &nvNewDeriv ); END } --- 1339,1346 ----- NVectorDestroy( &nvDir ); NVectorDestroy( &nvNewPos ); NVectorDestroy( &nvNewDeriv ); + NVectorDestroy( &nvTempPos ); + NVectorDestroy( &nvTempDeriv ); END } -----------------------------------------------------------------------------