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:
355a597
)
fix #25
author
Steven G. Johnson
<stevenj@mit.edu>
Thu, 18 Sep 2014 16:40:13 +0000
(12:40 -0400)
committer
Steven G. Johnson
<stevenj@mit.edu>
Thu, 18 Sep 2014 16:40:13 +0000
(12:40 -0400)
bobyqa/bobyqa.c
patch
|
blob
|
history
diff --git
a/bobyqa/bobyqa.c
b/bobyqa/bobyqa.c
index 8fc454b67442ef885242e8efda5b230f4ab93eb0..9945b607583eb4b7d716636e30957a3f834bf065 100644
(file)
--- a/
bobyqa/bobyqa.c
+++ b/
bobyqa/bobyqa.c
@@
-3101,6
+3101,7
@@
nlopt_result bobyqa(int n, int npt, double *x,
nlopt_rescale(U(n), s, x, x); --x;
xs = (double *) malloc(sizeof(double) * (U(n)));
+ if (!xs) { ret = NLOPT_OUT_OF_MEMORY; goto done; }
sxl = nlopt_new_rescaled(U(n), s, xl);
if (!sxl) { ret = NLOPT_OUT_OF_MEMORY; goto done; }