mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
fix leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28771 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a1e0763383
commit
de17e037eb
3 changed files with 5 additions and 7 deletions
|
@ -50,6 +50,7 @@ extern "C" {
|
||||||
BOOL _targetRetained;
|
BOOL _targetRetained;
|
||||||
BOOL _validReturn;
|
BOOL _validReturn;
|
||||||
BOOL _sendToSuper;
|
BOOL _sendToSuper;
|
||||||
|
void *_retptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
@interface GSFFIInvocation : NSInvocation
|
@interface GSFFIInvocation : NSInvocation
|
||||||
{
|
{
|
||||||
uint8_t _retbuf[32]; // Store return values of up to 32 bytes here.
|
uint8_t _retbuf[32]; // Store return values of up to 32 bytes here.
|
||||||
void *_retptr; // Store bigger return values in here.
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -329,18 +329,12 @@ _arg_addr(NSInvocation *inv, int index)
|
||||||
if (_cframe)
|
if (_cframe)
|
||||||
{
|
{
|
||||||
NSZoneFree(NSDefaultMallocZone(), _cframe);
|
NSZoneFree(NSDefaultMallocZone(), _cframe);
|
||||||
_retval = 0; // Part of _cframe
|
|
||||||
}
|
}
|
||||||
#elif defined(USE_FFCALL)
|
#elif defined(USE_FFCALL)
|
||||||
if (_cframe)
|
if (_cframe)
|
||||||
{
|
{
|
||||||
NSZoneFree(NSDefaultMallocZone(), _cframe);
|
NSZoneFree(NSDefaultMallocZone(), _cframe);
|
||||||
}
|
}
|
||||||
if (_retptr)
|
|
||||||
{
|
|
||||||
NSZoneFree(NSDefaultMallocZone(), _retptr);
|
|
||||||
}
|
|
||||||
_retval = 0;
|
|
||||||
#else
|
#else
|
||||||
if (_cframe)
|
if (_cframe)
|
||||||
{
|
{
|
||||||
|
@ -351,6 +345,10 @@ _arg_addr(NSInvocation *inv, int index)
|
||||||
NSZoneFree(NSDefaultMallocZone(), _retval);
|
NSZoneFree(NSDefaultMallocZone(), _retval);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (_retptr)
|
||||||
|
{
|
||||||
|
NSZoneFree(NSDefaultMallocZone(), _retptr);
|
||||||
|
}
|
||||||
RELEASE(_sig);
|
RELEASE(_sig);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue