Sebastian Lackner : server: Avoid calling close on negative value in create_console_output handler ( Coverity).
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 20 09:54:15 CST 2014
Module: wine
Branch: master
Commit: d00e8ebda7e05738de5bed3fea1397b64691b929
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d00e8ebda7e05738de5bed3fea1397b64691b929
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Wed Nov 19 19:46:03 2014 +0100
server: Avoid calling close on negative value in create_console_output handler (Coverity).
---
server/console.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/console.c b/server/console.c
index b7f8206..c83ec01 100644
--- a/server/console.c
+++ b/server/console.c
@@ -1609,12 +1609,12 @@ DECL_HANDLER(create_console_output)
else fd = -1;
if (!(console = console_input_get( req->handle_in, FILE_WRITE_PROPERTIES )))
{
- close(fd);
+ if (fd != -1) close( fd );
return;
}
if (console_input_is_bare( console ) ^ (fd != -1))
{
- close( fd );
+ if (fd != -1) close( fd );
release_object( console );
set_error( STATUS_INVALID_HANDLE );
return;
More information about the wine-cvs
mailing list