lkml.org 
[lkml]   [2023]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1] drivers: use free_netdev before return
Date
We fixed a bug where the variable dev
was not freed before return.

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
arch/um/drivers/vector_kern.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 131b7cb29..af7f6fd4c 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1655,6 +1655,7 @@ static void vector_eth_configure(
return;

out_undo_user_init:
+ free_netdev(dev);
return;
out_free_netdev:
free_netdev(dev);
--
2.39.0
\
 
 \ /
  Last update: 2023-07-03 11:42    [W:0.027 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site