Force fd close on error
authorakallabeth <akallabeth@posteo.net>
Fri, 26 Mar 2021 10:01:41 +0000 (11:01 +0100)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 25 May 2021 13:30:50 +0000 (15:30 +0200)
(cherry picked from commit 74c46001435a2dfc3b6978bf8d1f25f266a91659)

winpr/libwinpr/clipboard/posix.c

index 38df699..540815e 100644 (file)
@@ -872,7 +872,7 @@ static UINT posix_file_get_range(struct posix_file* file, UINT64 offset, UINT32
 
 out:
 
-       posix_file_read_close(file, FALSE);
+       posix_file_read_close(file, error != NO_ERROR);
        return error;
 }