[PATCH 1/7] ntdll: Prevent double free (Coverity)

Fabian Maurer dark.shadow4 at web.de
Sat Apr 23 13:17:23 CDT 2022


fd will be closed at the end of the function anyways

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/ntdll/unix/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index cc8bf0c6e82..a6d76a49b27 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -4215,7 +4215,6 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
                         int res = recv( fd, tmpbuf, size, MSG_PEEK );
                         info->MessagesAvailable = (res > 0);
                         info->NextMessageSize = (res >= 0) ? res : MAILSLOT_NO_MESSAGE;
-                        if (needs_close) close( fd );
                     }
                     free( tmpbuf );
                 }
--
2.36.0




More information about the wine-devel mailing list