Commit e1cd4004 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jiri Kosina
Browse files

HID: sony: Fix a potential memory leak in sony_probe()



If an error occurs after a successful usb_alloc_urb() call, usb_free_urb()
should be called.

Fixes: fb1a79a6 ("HID: sony: fix freeze when inserting ghlive ps3/wii dongles")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 29aa98d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2155,6 +2155,9 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
	return ret;

err:
	if (sc->ghl_urb)
		usb_free_urb(sc->ghl_urb);

	hid_hw_stop(hdev);
	return ret;
}