Hello Steven
in api/optimize.c, line 636ff variable freedx is set, but the code that
uses it can never be reached due to a return statement.
case NLOPT_LN_COBYLA: {
nlopt_result ret;
int freedx = 0;
if (!opt->dx) {
freedx = 1;
if (nlopt_set_default_initial_step(opt, x) != NLOPT_SUCCESS)
return NLOPT_OUT_OF_MEMORY;
}
return cobyla_minimize(n, f, f_data,
opt->m, opt->fc,
opt->p, opt->h,
lb, ub, x, minf, &stop,
opt->dx);
if (freedx) { free(opt->dx); opt->dx = NULL; }
return ret;
}
Best regards
Heinrich Schuchardt
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss