mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +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)
|
if (!adapter || !hid)
|
||||||
{
|
{
|
||||||
|
free(adapter);
|
||||||
fprintf(stderr, "Allocation of adapter failed.\n");
|
fprintf(stderr, "Allocation of adapter failed.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user