mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
libusb_hid: Fix a potential memory leak
This commit is contained in:
parent
eeb28dc4fb
commit
fff8ef3db7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user