Fixed a file descriptor leak.

This commit is contained in:
Alexandre Julliard 2005-09-02 12:31:35 +00:00
parent 064b54a0ad
commit 54e9e8745d
1 changed files with 5 additions and 1 deletions

View File

@ -498,7 +498,11 @@ int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, int *uni
if (FILE_GetDeviceInfo( fd, &info ) == STATUS_SUCCESS) if (FILE_GetDeviceInfo( fd, &info ) == STATUS_SUCCESS)
removable = (info.Characteristics & FILE_REMOVABLE_MEDIA) != 0; removable = (info.Characteristics & FILE_REMOVABLE_MEDIA) != 0;
} }
else if (removable) break; /* don't cache it */ else if (removable) /* don't cache it */
{
*unix_fd = fd;
return STATUS_SUCCESS;
}
/* and store it back into the cache */ /* and store it back into the cache */
SERVER_START_REQ( set_handle_fd ) SERVER_START_REQ( set_handle_fd )