fix for issue reported by Mathias Bauer <mathias_bauer@gmx.net>

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37611 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-01-16 15:15:52 +00:00
parent 80f925978a
commit bdf6dc7e23
3 changed files with 14 additions and 6 deletions

View file

@ -1096,15 +1096,17 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user)
return instance;
}
/* Locks receiver and returns path info on success, otherwise
* leaves receiver munlocked and returns nil.
/* Locks receiver and returns path info on success, otherwise leaves
* receiver unlocked and returns nil.
* The returned path info is retained and autoreleased in case something
* removes it from the receiver while it's being used by the caller.
*/
- (GSKVOPathInfo*) lockReturningPathInfoForKey: (NSString*)key
{
GSKVOPathInfo *pathInfo;
[iLock lock];
pathInfo = (GSKVOPathInfo*)NSMapGet(paths, (void*)key);
pathInfo = AUTORELEASE(RETAIN((GSKVOPathInfo*)NSMapGet(paths, (void*)key)));
if (pathInfo == nil)
{
[iLock unlock];