Skip to content

Commit 38933c1

Browse files
authored
Fix leak when listing protocols (#316)
1 parent 0c1a893 commit 38933c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocol.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ Protocol*__unsafe_unretained* objc_copyProtocolList(unsigned int *outCount)
516516
{
517517
p[count++] = next;
518518
}
519+
if (NULL != e)
520+
{
521+
free(e);
522+
}
519523
if (NULL != outCount)
520524
{
521525
*outCount = total;

0 commit comments

Comments
 (0)