]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: atmel_mxt_ts - fix double free in mxt_read_info_block
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 13 Dec 2021 05:01:49 +0000 (21:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:20:46 +0000 (12:20 +0100)
commitf29fe79e02fcc0458c56553ee925ac93bed71e6e
tree14d6c69c125a9a3163594f522b8a6ce575b5777d
parent9f8daff52b344d729ccecce07df66e2aad33a76a
Input: atmel_mxt_ts - fix double free in mxt_read_info_block

commit 12f247ab590a08856441efdbd351cf2cc8f60a2d upstream.

The "id_buf" buffer is stored in "data->raw_info_block" and freed by
"mxt_free_object_table" in case of error.

Return instead of jumping to avoid a double free.

Addresses-Coverity-ID: 1474582 ("Double free")
Fixes: 068bdb67ef74 ("Input: atmel_mxt_ts - fix the firmware update")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://lore.kernel.org/r/20211212194257.68879-1-jose.exposito89@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/touchscreen/atmel_mxt_ts.c