Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402100 > unrolled thread

[PATCH 05/11] serial: pic32_uart: Fix double free of 'sport->irq_fault_name'.

Started byPurna Chandra Mandal <purna.mandal@microchip.com>
First post2016-05-17 07:10 +0200
Last post2016-05-17 07:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 05/11] serial: pic32_uart: Fix double free of 'sport->irq_fault_name'. Purna Chandra Mandal <purna.mandal@microchip.com> - 2016-05-17 07:10 +0200

#1402100 — [PATCH 05/11] serial: pic32_uart: Fix double free of 'sport->irq_fault_name'.

FromPurna Chandra Mandal <purna.mandal@microchip.com>
Date2016-05-17 07:10 +0200
Subject[PATCH 05/11] serial: pic32_uart: Fix double free of 'sport->irq_fault_name'.
Message-ID<rzFqy-fn-15@gated-at.bofh.it>
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>

---

 drivers/tty/serial/pic32_uart.c | 1 -
 1 file changed, 1 deletion(-)

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;
 	}
-- 
1.8.3.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web