diff options
author | Thomas White <taw@physics.org> | 2019-09-12 16:30:30 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-09-12 16:31:26 +0200 |
commit | 38b7ef6b854c199c5c74e8d8c4e4214469a7877e (patch) | |
tree | e7fdf6972a2de8d7d875f991e52b1b63f4e58e36 /libcrystfel | |
parent | 8287ae8cd30b5446c6269c8cf58b742a2e304a1f (diff) |
Fix possibly uninitialised CiAMCB
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/cell-utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |