]> git.baikalelectronics.ru Git - kernel.git/commit
Input: atmel_mxt_ts - don't try to free unallocated kernel memory
authorSanjeev Chugh <sanjeev_chugh@mentor.com>
Sat, 29 Dec 2018 01:04:31 +0000 (17:04 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 29 Dec 2018 01:07:05 +0000 (17:07 -0800)
commit5daf18d39693266cbb207516d4a1b43c3bec0034
treecfeb28c9b477656bc442ece9999b337f03502426
parent6b6522d88be4297e84c4fb2d050e01d9f9cf27e0
Input: atmel_mxt_ts - don't try to free unallocated kernel memory

If the user attempts to update Atmel device with an invalid configuration
cfg file, error handling code is trying to free cfg file memory which is
not allocated yet hence results into kernel crash.

This patch fixes the order of memory free operations.

Signed-off-by: Sanjeev Chugh <sanjeev_chugh@mentor.com>
Fixes: 8b60fa0f43fa ("Input: atmel_mxt_ts - zero terminate config firmware file")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/atmel_mxt_ts.c