diff options
author | Thomas White <taw@physics.org> | 2021-07-21 11:51:56 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-07-21 15:34:31 +0200 |
commit | 6d94d4115c254d344bbb927596a7141ef39fd298 (patch) | |
tree | 652d07c4d6a9521c9359aa13bbda27309f53e6f8 /src/whirligig.c | |
parent | 50cf52b0bc0baa683b9508568131a3f6281bf4ff (diff) |
Add missing cleanup on error paths
Diffstat (limited to 'src/whirligig.c')
-rw-r--r-- | src/whirligig.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/whirligig.c b/src/whirligig.c index d964557f..546301ba 100644 --- a/src/whirligig.c +++ b/src/whirligig.c @@ -167,7 +167,10 @@ static void process_series(struct image *images, signed int *ser, } p = calloc(len, sizeof(RefList *)); - if ( p == NULL ) return; + if ( p == NULL ) { + fclose(fh); + return; + } fprintf(fh, "%i frames in series\n\n", len); fprintf(fh, " # Serial Filename EventID Crystal\n"); |