From 464b7ff32f47009fae6c80519f68a1de3151449d Mon Sep 17 00:00:00 2001 From: rfm Date: Sat, 24 Dec 2011 13:14:46 +0000 Subject: [PATCH] fix for #35164 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34355 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSConnection.m | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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 ":" */