aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/reax.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-02-21 17:16:07 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:45 +0100
commit75a5b1a7edf3904f09bf1765fc762c5cc478d1e6 (patch)
treed089c11b67afeeda3b611c6f6988fcd58c8ffa92 /libcrystfel/src/reax.c
parentbdbc9bfa11c862bc1eb72785cab512845bc2818d (diff)
Fix some memory leaks
Diffstat (limited to 'libcrystfel/src/reax.c')
-rw-r--r--libcrystfel/src/reax.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libcrystfel/src/reax.c b/libcrystfel/src/reax.c
index 37e1ca05..d624e236 100644
--- a/libcrystfel/src/reax.c
+++ b/libcrystfel/src/reax.c
@@ -1013,7 +1013,11 @@ void reax_index(IndexingPrivate *pp, struct image *image, UnitCell *cell)
pmax = max_feature_resolution(image->features);
/* Sanity check */
- if ( pmax < 1e4 ) return;
+ if ( pmax < 1e4 ) {
+ fftw_free(fft_in);
+ fftw_free(fft_out);
+ return;
+ }
s = search_all_axes(cell, pmax);
find_candidates(p, image->features, pmax, fft_in, fft_out, s,
@@ -1112,6 +1116,8 @@ void reax_cleanup(IndexingPrivate *pp)
assert(pp->indm == INDEXING_REAX);
p = (struct reax_private *)pp;
+ free(p->directions);
+
fftw_destroy_plan(p->plan);
fftw_free(p->fft_in);
fftw_free(p->fft_out);