Skip to content

Commit

Permalink
Merge pull request libretro#1629 from lioncash/leak
Browse files Browse the repository at this point in the history
libusb_hid: Fix a potential memory leak
  • Loading branch information
inactive123 committed Apr 15, 2015
2 parents c2f659f + fff8ef3 commit e9dd160
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions input/drivers_hid/libusb_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ static int add_adapter(void *data, struct libusb_device *dev)

if (!adapter || !hid)
{
free(adapter);
fprintf(stderr, "Allocation of adapter failed.\n");
return -1;
}
Expand Down

0 comments on commit e9dd160

Please sign in to comment.