diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-07-11 22:54:53 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-07-11 22:54:53 +0200 |
commit | 849df8b6dd7de1d45eaf8af1f4f2b1c1d72e5c9c (patch) | |
tree | 641d3211bc42fd0ce2ab8c6009f9eff0e76f76b8 /libcrystfel/src/reax.c | |
parent | 0fe6353366b4175b63739f5da63c1cef2c2b74dd (diff) |
Fix a load of memory leaks
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r-- | libcrystfel/src/reax.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c index 58dce40a..3124a77c 100644 --- a/libcrystfel/src/reax.c +++ b/libcrystfel/src/reax.c @@ -348,6 +348,7 @@ static double iterate_refine_vector(double *x, double *y, double *z, gsl_matrix_free(C); gsl_vector_free(A); + gsl_vector_free(t); return dtmax; } @@ -1019,6 +1020,7 @@ void reax_index(IndexingPrivate *pp, struct image *image, UnitCell *cell) fftw_complex *fft_out; double pmax; struct reax_search *s; + int i; assert(pp->indm == INDEXING_REAX); p = (struct reax_private *)pp; @@ -1045,6 +1047,11 @@ void reax_index(IndexingPrivate *pp, struct image *image, UnitCell *cell) assemble_cells_from_candidates(image, s, cell); + for ( i=0; i<s->n_search; i++ ) { + free(s->search[i].cand); + } + free(s->search); + free(s); fftw_free(fft_in); fftw_free(fft_out); } |