Commit 24a6a303 authored by Purna Chandra Mandal's avatar Purna Chandra Mandal Committed by Greg Kroah-Hartman

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: default avatarPurna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 210417ce
...@@ -445,7 +445,6 @@ static int pic32_uart_startup(struct uart_port *port) ...@@ -445,7 +445,6 @@ static int pic32_uart_startup(struct uart_port *port)
sport->idx); sport->idx);
if (!sport->irq_rx_name) { if (!sport->irq_rx_name) {
dev_err(port->dev, "%s: kasprintf err!", __func__); dev_err(port->dev, "%s: kasprintf err!", __func__);
kfree(sport->irq_fault_name);
ret = -ENOMEM; ret = -ENOMEM;
goto out_f; goto out_f;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment