mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
thread-safety fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25999 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83829d5c01
commit
8753546d14
1 changed files with 4 additions and 1 deletions
|
@ -405,7 +405,6 @@ myHostName()
|
|||
{
|
||||
host = [_hostCache objectForKey: address];
|
||||
}
|
||||
|
||||
if (host == nil)
|
||||
{
|
||||
struct hostent *h;
|
||||
|
@ -441,6 +440,10 @@ myHostName()
|
|||
AUTORELEASE(host);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AUTORELEASE(RETAIN(host));
|
||||
}
|
||||
[_hostCacheLock unlock];
|
||||
return host;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue