diff options
author | Purna Chandra Mandal <purna.mandal@microchip.com> | 2016-05-17 05:05:54 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-25 20:50:53 (GMT) |
commit | 24a6a3037e0b47168f9b3bb9db7ad60c89dad7ba (patch) | |
tree | a2e09aa866698d1184bc73b10ce4fe24a66b082e | |
parent | 210417ce836aa3f0ededcc8f541f5e4a05d2e880 (diff) | |
download | linux-24a6a3037e0b47168f9b3bb9db7ad60c89dad7ba.tar.xz |
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 <purna.mandal@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/pic32_uart.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index 62a43bf..7f8e99b 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; } |