msvcrt: Don't lock __badioinfo.

This commit is contained in:
Piotr Caban 2015-06-04 11:24:52 +02:00 committed by Alexandre Julliard
parent f00b7f4058
commit eec7a565be
1 changed files with 3 additions and 1 deletions

View File

@ -260,6 +260,8 @@ static inline ioinfo* get_ioinfo_nolock(int fd)
static inline ioinfo* get_ioinfo(int fd)
{
ioinfo *ret = get_ioinfo_nolock(fd);
if(ret == &MSVCRT___badioinfo)
return ret;
if(!(ret->exflag & EF_CRIT_INIT)) {
LOCK_FILES();
if(!(ret->exflag & EF_CRIT_INIT)) {
@ -274,7 +276,7 @@ static inline ioinfo* get_ioinfo(int fd)
static inline void release_ioinfo(ioinfo *info)
{
if(info->exflag & EF_CRIT_INIT)
if(info!=&MSVCRT___badioinfo && info->exflag & EF_CRIT_INIT)
LeaveCriticalSection(&info->crit);
}