diff --git a/ChangeLog b/ChangeLog index d7e247ff4..6ceb2790d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-12-24 Richard Frith-Macdonald + + * Source/NSConnection.m: Fix retain rount error spotted by + (bug #35164) + 2011-12-23 Wolfgang Lux * Headers/Foundation/NSTextCheckingResult.h: diff --git a/Source/NSConnection.m b/Source/NSConnection.m index c8bd5c24c..980b102a8 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -2555,8 +2555,11 @@ static NSLock *cached_proxies_gate = nil; decoder = aRmc; - /* Decode the object, (which is always the first argument to a method). */ - [decoder decodeValueOfObjCType: @encode(id) at: &object]; + /* Decode the object, (which is always the first argument to a method). + * Use the -decodeObject method to ensure that the target of the + * invocation is autoreleased and will be deallocated when we finish. + */ + object = [decoder decodeObject]; /* Decode the selector, (which is the second argument to a method). */ /* xxx @encode(SEL) produces "^v" in gcc 2.5.8. It should be ":" */