aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-29 17:45:47 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:22 +0100
commit3dbca6cf61383d85aa8cc67dd6287f2be83d9923 (patch)
treef85b5e9aa5ac7310fe2db9f9d684bdc136ae3155
parent6426a1ea28404e13227c50ab4ebe6fe815506997 (diff)
Don't free(garbage)
-rw-r--r--src/indexamajig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 549fc2db..953fd81d 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -220,6 +220,7 @@ static void process_image(void *pp, int cookie)
image.features = NULL;
image.data = NULL;
+ image.flags = NULL;
image.indexed_cell = NULL;
image.id = cookie;
image.filename = filename;
@@ -346,7 +347,7 @@ static void process_image(void *pp, int cookie)
cell_free(image.indexed_cell);
free(image.data);
- free(image.flags);
+ if ( image.flags != NULL ) free(image.flags);
image_feature_list_free(image.features);
hdfile_close(hdfile);
free_detector_geometry(image.det);