diff options
author | Nick White <git@njw.name> | 2024-03-04 22:45:04 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2024-03-04 22:45:04 +0000 |
commit | 24cd1e74eb4de3502b53ad4cd3734f4ad4e9a5d6 (patch) | |
tree | ac6a46b21cd9cbb02c1089aeb2583cdc819f4123 /cmd/rescribe/main.go | |
parent | 409a17b82980e6801ac437606e3a5f69ae12beaa (diff) |
Ensure an invalid jpeg is closed before removal is attempted, to fix crash on Windows
Diffstat (limited to 'cmd/rescribe/main.go')
-rw-r--r-- | cmd/rescribe/main.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index 8ae29ff..16c284c 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -473,6 +473,7 @@ func rmIfNotImage(f string) error { return fmt.Errorf("Failed to open image %s: %v\n", f, err) } _, err = jpeg.Decode(r) + r.Close() if err == nil { return nil } |