]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/hid/hid-picolcd.c
HID: hid-picolcd: Fix memory leak in picolcd_debug_out_report()
[mv-sheeva.git] / drivers / hid / hid-picolcd.c
index 0aff3cdddd83f77dcc5aabfe05cfa218ebbbfc22..abd0bdc84624ab773f60a727d80b65924f91ca60 100644 (file)
@@ -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 {