chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab01315
)
fix memory leak for error condition
author
stevenj
<stevenj@alum.mit.edu>
Mon, 12 Jul 2010 22:31:17 +0000
(18:31 -0400)
committer
stevenj
<stevenj@alum.mit.edu>
Mon, 12 Jul 2010 22:31:17 +0000
(18:31 -0400)
darcs-hash:
20100712223117
-c8de0-
1d1a5920fdadab5ae0f7f25154d7b3d823bd6715
.gz
test/testopt.cpp
patch
|
blob
|
history
diff --git
a/test/testopt.cpp
b/test/testopt.cpp
index b1fed82dfd779bc670c187be102e231ab9d2ae66..307fddfc781b1ab96de50b39ccf7f401f3d9cc94 100644
(file)
--- a/
test/testopt.cpp
+++ b/
test/testopt.cpp
@@
-209,6
+209,7
@@
static int test_function(int ifunc)
printf("return code %d from nlopt_minimize\n", ret);
if (ret < 0 && ret != NLOPT_ROUNDOFF_LIMITED) {
fprintf(stderr, "testopt: error in nlopt_minimize\n");
+ free(x);
return 0;
}
printf("Found minimum f = %g after %d evaluations.\n",