Skip to content

Commit

Permalink
Fix leak when listing protocols (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm authored Dec 20, 2024
1 parent 0c1a893 commit 38933c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ Protocol*__unsafe_unretained* objc_copyProtocolList(unsigned int *outCount)
{
p[count++] = next;
}
if (NULL != e)
{
free(e);
}
if (NULL != outCount)
{
*outCount = total;
Expand Down

0 comments on commit 38933c1

Please sign in to comment.