Fixed all (I think) memory leaks in DO with exceptions using FFCALL

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10946 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-09-21 15:51:24 +00:00
parent 7596e3cfba
commit f8cf838ad5
2 changed files with 6 additions and 12 deletions

View file

@ -1537,20 +1537,15 @@ static void retDecoder(DOContext *ctxt)
if (is_exception == YES)
{
/* Decode the exception object, and raise it. */
id exc;
[coder decodeValueOfObjCType: @encode(id) at: &exc];
id exc = [coder decodeObject];
ctxt->decoder = nil;
[ctxt->connection _doneInRmc: coder];
[ctxt->connection _doneInReply: coder];
if (ctxt->datToFree != 0)
{
NSZoneFree(NSDefaultMallocZone(), ctxt->datToFree);
ctxt->datToFree = 0;
}
if (ctxt->objToFree != nil)
{
NSDeallocateObject(ctxt->objToFree);
ctxt->objToFree = nil;
}
[exc raise];
}
}