diff options
author | Thomas White <taw@physics.org> | 2019-01-28 14:54:15 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-01-28 14:55:31 +0100 |
commit | ed0431ce89dd9be590d30501ed4fa96e5b3c33a5 (patch) | |
tree | ec98e18fe958ac39c6739f167ee835f687f63a77 /src | |
parent | 339e02b22b51cb344d4aea26fe86281f9dbe6322 (diff) |
partialator: Fix incorrect free(audit_info)
Diffstat (limited to 'src')
-rw-r--r-- | src/partialator.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/partialator.c b/src/partialator.c index 8b4893a5..fd610ddb 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -1422,7 +1422,6 @@ int main(int argc, char *argv[]) fprintf(stderr, "\n"); if ( sparams_fh != NULL ) fclose(sparams_fh); audit_info = stream_audit_info(st); - free(audit_info); close_stream(st); STATUS("Initial partiality calculation...\n"); @@ -1551,8 +1550,11 @@ int main(int argc, char *argv[]) /* Output results */ STATUS("Writing overall results to %s\n", outfile); reflist_add_command_and_version(full, argc, argv); - reflist_add_notes(full, "Audit information from stream:"); - reflist_add_notes(full, audit_info); + if ( audit_info != NULL ) { + reflist_add_notes(full, "Audit information from stream:"); + reflist_add_notes(full, audit_info); + free(audit_info); + } write_reflist_2(outfile, full, sym); /* Output split results */ |