chiark / gitweb /
Fixes memory leak in auglag/auglag.c
authorAaronWebster <AaronWebster@users.noreply.github.com>
Fri, 29 Jan 2016 04:53:43 +0000 (20:53 -0800)
committerAaronWebster <AaronWebster@users.noreply.github.com>
Fri, 29 Jan 2016 04:53:43 +0000 (20:53 -0800)
Fixes a memory leak in auglag/auglag.c where the working space xcur wasn't being `free`d under certain conditions.

auglag/auglag.c

index f43934e6f9037843f219e442a378f0fc0b509646..f18cfece6f21816b576a7f92a8f81320626626d3 100644 (file)
@@ -280,7 +280,7 @@ nlopt_result auglag_minimize(int n, nlopt_func f, void *f_data,
             condition seems not too different from requiring feasibility,
             especially now that the user can provide constraint-specific
             tolerances analogous to epsilon. */
-         if (ICM == 0) return NLOPT_FTOL_REACHED;
+         if (ICM == 0) {ret = NLOPT_FTOL_REACHED; break;}
      } while (1);
 
 done: