Xiaomi_Kernel_OpenSource
Xiaomi_Kernel_OpenSource copied to clipboard
NULL pointer dereferencing in the touchscreen driver of daisy-o-oss branch
There is a suspected NULL pointer dereferencing issue (http://cwe.mitre.org/data/definitions/476.html) with the daisy-o-oss branch, in drivers/input/touchscreen/gt917d/gt9xx.c, line 1457. When kmalloc fails (line 1455), page remains NULL, but kfree is called (line 1457) which dereferences the NULL pointer. Possible fix can be remove this line.
Same on daisy-p-oss
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/daisy-p-oss/drivers/input/touchscreen/gt917d/gt9xx.c#L1629