aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-04-08 16:54:29 +0200
committerThomas White <taw@physics.org>2013-04-08 16:54:29 +0200
commitff270f275724bfa5fb9b7d184450fd13f34e0ba8 (patch)
tree26c0cdfaf5e633802c69709ebe51c9794494c709
parentc88c59d6239d3f631964f9a1f541ce9a78ffdc7e (diff)
Fix memory leaks
-rw-r--r--src/process_hkl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index 8705ce0f..47ca2feb 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -321,6 +321,8 @@ static int merge_all(Stream *st, RefList *model, RefList *reference,
if ( r == 0 ) n_crystals_used++;
+ reflist_free(crystal_get_reflections(cr));
+ cell_free(crystal_get_cell(cr));
crystal_free(cr);
if ( n_crystals_used == stop_after ) break;
@@ -329,6 +331,7 @@ static int merge_all(Stream *st, RefList *model, RefList *reference,
free(image.filename);
image_feature_list_free(image.features);
+ free(image.crystals);
display_progress(n_images, n_crystals_seen, n_crystals_used);
@@ -605,9 +608,10 @@ int main(int argc, char *argv[])
close_stream(st);
- free(sym);
+ free_symoplist(sym);
reflist_free(model);
free(output);
+ free(filename);
return 0;
}