aboutsummaryrefslogtreecommitdiff
path: root/src/post-refinement.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-03-01 17:25:09 +0100
committerThomas White <taw@physics.org>2019-03-01 17:25:09 +0100
commitf9104d74ec7c6183521a8eb6500e95470b536b6c (patch)
treea578065c688beeaa70989b5026f909f83126b0ce /src/post-refinement.c
parentcb2eb72d8b05a31a28eebf77a988a6fe2cf8e17e (diff)
partialator: Fix two small memory leaks
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r--src/post-refinement.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 47bf16e7..4ab25b54 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -480,8 +480,9 @@ void write_test_logs(Crystal *crystal, const RefList *full,
}
if ( cycle == 0 ) {
- fprintf(fh, "Image: %s %s\n",
- image->filename, get_event_string(image->event));
+ char *evstr = get_event_string(image->event);
+ fprintf(fh, "Image: %s %s\n", image->filename, evstr);
+ free(evstr);
}
if ( cycle >= 0 ) {
@@ -536,9 +537,10 @@ void write_specgraph(Crystal *crystal, const RefList *full,
}
if ( cycle == 0 ) {
- fprintf(fh, "Image: %s %s\n",
- image->filename, get_event_string(image->event));
+ char *evstr = get_event_string(image->event);
+ fprintf(fh, "Image: %s %s\n", image->filename, evstr);
fprintf(fh, "khalf/m 1/d(m) pcalc pobs iteration h k l\n");
+ free(evstr);
}
cell = crystal_get_cell(crystal);