aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-25 09:31:34 +0100
committerThomas White <taw@physics.org>2019-01-28 14:55:31 +0100
commit9b1d07ba6ed79d2b32b1e8fa92bd93628f66b1c0 (patch)
tree12f43425f32555c4c0145b5fba1465302d2398d3 /libcrystfel/src/stream.c
parent9d7a9223c780ff9ce75fa4ccac2321a011ae640b (diff)
partialator: Fix multiple memory leaks
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index bcd2627e..66b3b657 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1131,6 +1131,18 @@ static void read_crystal(Stream *st, struct image *image, StreamReadFlags srf)
}
+void free_stuff_from_stream(struct stuff_from_stream *sfs)
+{
+ int i;
+ if ( sfs == NULL ) return;
+ for ( i=0; i<sfs->n_fields; i++ ) {
+ free(sfs->fields[i]);
+ }
+ free(sfs->fields);
+ free(sfs);
+}
+
+
static int read_and_store_field(struct image *image, const char *line)
{
char **new_fields;