server: Avoid calling close on negative value in create_console_output handler (Coverity).

This commit is contained in:
Sebastian Lackner 2014-11-19 19:46:03 +01:00 committed by Alexandre Julliard
parent a5c3f38773
commit d00e8ebda7
1 changed files with 2 additions and 2 deletions

View File

@ -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;