diff options
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r-- | libcrystfel/src/integration.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 3a3c9629..91f9ab21 100644 --- a/libcrystfel/src/integration.c +++ b/libcrystfel/src/integration.c @@ -561,7 +561,11 @@ static void free_intcontext(struct intcontext *ic) { int i; + for ( i=0; i<ic->n_boxes; i++ ) { + free(ic->boxes[i].bm); + } free(ic->boxes); + for ( i=0; i<ic->n_reference_profiles; i++ ) { free(ic->reference_profiles[i]); free(ic->reference_den[i]); @@ -663,6 +667,8 @@ static void delete_box(struct intcontext *ic, struct peak_box *bx) return; } + free(bx->bm); + memmove(&ic->boxes[i], &ic->boxes[i+1], (ic->n_boxes-i-1)*sizeof(struct peak_box)); ic->n_boxes--; @@ -941,6 +947,7 @@ static int center_and_check_box(struct intcontext *ic, struct peak_box *bx, t_offs_fs += rint(offs_fs); t_offs_ss += rint(offs_fs); + free(bx->bm); if ( check_box(ic, bx, sat) ) return 1; if ( t_offs_fs*t_offs_fs + t_offs_ss*t_offs_ss > ic->w*ic->w ) { |