aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-10-22 17:50:37 +0200
committerThomas White <taw@physics.org>2014-10-23 17:02:32 +0200
commit1a37de5cce5c2df83e37fb189409659299594b1b (patch)
treedeb3e7c3b8b661c07aa2a4a4a663c97081d63b05 /libcrystfel/src/stream.c
parent8bdd03533aefabfe13259eb6e9b585420b4ed984 (diff)
Fix a load of memory leaks
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 519a1ca9..c1b32a4f 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1304,6 +1304,9 @@ void write_geometry_file(Stream *st, const char *geom_filename) {
rval = fgets(line, 1023, geom_fh);
fputs(line, st->fh);
} while ( rval != NULL );
+
+ fclose(geom_fh);
+
fprintf(st->fh, GEOM_END_MARKER"\n");
fflush(st->fh);
}