aboutsummaryrefslogtreecommitdiff
path: root/src/mathfunc.cpp
diff options
context:
space:
mode:
authorPjotr Prins2017-12-07 12:03:09 +0000
committerPjotr Prins2017-12-07 12:03:09 +0000
commita398947aa3734738a27fc7b2811ef72fbcbfcd90 (patch)
treec1a9eed4e3613df67643ff2efb2214d5dd8c6eef /src/mathfunc.cpp
parentb1fdf72b0723982a1305a2439f0151ceaf2c1176 (diff)
downloadpangemma-a398947aa3734738a27fc7b2811ef72fbcbfcd90.tar.gz
Travis: fixes
Diffstat (limited to 'src/mathfunc.cpp')
-rw-r--r--src/mathfunc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mathfunc.cpp b/src/mathfunc.cpp
index 644b3e8..2cce43f 100644
--- a/src/mathfunc.cpp
+++ b/src/mathfunc.cpp
@@ -264,8 +264,12 @@ bool isMatrixPositiveDefinite(const gsl_matrix *G) {
auto s = gsl_linalg_cholesky_decomp(G2);
#endif
gsl_set_error_handler(handler);
- gsl_matrix_safe_free(G2);
- return (s == GSL_SUCCESS);
+ if (s == GSL_SUCCESS) {
+ gsl_matrix_safe_free(G2);
+ return true;
+ }
+ gsl_matrix_free(G2);
+ return (false);
}
gsl_vector *getEigenValues(const gsl_matrix *G) {