diff mbox

HID, hid-picolcd: Fix memory leak in picolcd_debug_out_report()

Message ID alpine.LNX.2.00.1101022212030.11481@swampdragon.chaosbits.net (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Jesper Juhl Jan. 2, 2011, 9:17 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index bc2e077..ad6539a 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -1867,6 +1867,7 @@  static void picolcd_debug_out_report(struct picolcd_data *data,
 			report->id, raw_size);
 	hid_debug_event(hdev, buff);
 	if (raw_size + 5 > sizeof(raw_data)) {
+		kfree(buff);
 		hid_debug_event(hdev, " TOO BIG\n");
 		return;
 	} else {