Commit d00e8ebd authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

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

parent a5c3f387
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment