Skip to content

Commit

Permalink
Fixed memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 9, 2012
1 parent 14f7ae6 commit 5d2a053
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions macosx_hidmanager.c
Expand Up @@ -73,6 +73,8 @@ static char *get_device_name(IOHIDDeviceRef device)
return NULL;
} /* if */

CFRelease(cfstr);

ptr = realloc(buf, strlen(buf) + 1); /* shrink down our allocation. */
if (ptr != NULL)
buf = (char *) ptr;
Expand Down

0 comments on commit 5d2a053

Please sign in to comment.