diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-03-10 10:44:03 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-03-10 10:44:03 +0100 |
commit | 2544135897b6e920d74f824c26bbf9a75df6d275 (patch) | |
tree | c94088678a4ef56d69ff02192b5b69c4c0cf31c4 | |
parent | 18f3a3a08794c933ed422a51580cf39e3c324cf7 (diff) |
Free the crystals
-rw-r--r-- | src/ambigator.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ambigator.c b/src/ambigator.c index 42838b41..3b83d749 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -885,7 +885,14 @@ int main(int argc, char *argv[]) } STATUS("Mean number of correlations per crystal: %.1f\n", mean_nac); - /* FIXME: Free crystals */ + for ( i=0; i<n_crystals; i++ ) { + free(crystals[i]->s); + free(crystals[i]->i); + free(crystals[i]->s_reidx); + free(crystals[i]->i_reidx); + free(crystals[i]); + } + free(crystals); for ( i=0; i<n_iter; i++ ) { detwin(ccs, n_crystals, assignments, fgfh, crystals); @@ -915,7 +922,6 @@ int main(int argc, char *argv[]) n_dif); free(assignments); - free(crystals); gsl_rng_free(rng); return 0; |