mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-28 11:10:51 +00:00
fix leak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37395 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b8275dc446
commit
8c09d03d19
1 changed files with 5 additions and 2 deletions
|
@ -829,16 +829,19 @@ GSProtocolGetMethodDescriptionRecursive(Protocol *aProtocol, SEL aSel, BOOL isRe
|
||||||
{
|
{
|
||||||
Protocol **list;
|
Protocol **list;
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
list = protocol_copyProtocolList(aProtocol, &count);
|
list = protocol_copyProtocolList(aProtocol, &count);
|
||||||
if (list != NULL)
|
if (list != NULL)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
desc = GSProtocolGetMethodDescriptionRecursive(list[i], aSel, isRequired, isInstance);
|
desc = GSProtocolGetMethodDescriptionRecursive(list[i],
|
||||||
|
aSel, isRequired, isInstance);
|
||||||
if (desc.name != NULL || desc.types != NULL)
|
if (desc.name != NULL || desc.types != NULL)
|
||||||
{
|
{
|
||||||
return desc;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(list);
|
free(list);
|
||||||
|
|
Loading…
Reference in a new issue