From 38b7ef6b854c199c5c74e8d8c4e4214469a7877e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 12 Sep 2019 16:30:30 +0200 Subject: Fix possibly uninitialised CiAMCB --- libcrystfel/src/cell-utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index 0365b426..f86a2108 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -1612,7 +1612,7 @@ int compare_derivative_cell_parameters(UnitCell *cell_in, UnitCell *reference_in Rational *cand_c; int ncand_a, ncand_b, ncand_c; int ia, ib; - RationalMatrix *CiAMCB; + RationalMatrix *CiAMCB = NULL; double min_dist = +INFINITY; /* Actually compare against primitive version of reference */ @@ -1724,8 +1724,7 @@ int compare_derivative_cell_parameters(UnitCell *cell_in, UnitCell *reference_in free(cand_b); free(cand_c); - if ( isinf(min_dist) ) { - rtnl_mtx_free(CiAMCB); + if ( CiAMCB == NULL ) { *pmb = NULL; return 0; } -- cgit v1.2.3