From: Purna Chandra Mandal Date: Tue, 17 May 2016 05:05:54 +0000 (+0530) Subject: serial: pic32_uart: Fix double free of 'sport->irq_fault_name'. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24a6a3037e0b47168f9b3bb9db7ad60c89dad7ba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git serial: pic32_uart: Fix double free of 'sport->irq_fault_name'. Allocated memory for 'sport->irq_fault_name' is freed twice, first in error check of 'if(!sport->irq_rx_name)' and other in fallback handler. Signed-off-by: Purna Chandra Mandal Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index 62a43bf5698e..7f8e99bbcb73 100644 --- a/drivers/tty/serial/pic32_uart.c +++ b/drivers/tty/serial/pic32_uart.c @@ -445,7 +445,6 @@ static int pic32_uart_startup(struct uart_port *port) sport->idx); if (!sport->irq_rx_name) { dev_err(port->dev, "%s: kasprintf err!", __func__); - kfree(sport->irq_fault_name); ret = -ENOMEM; goto out_f; }