linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Minjie Du <duminjie@vivo.com>
To: richard@nod.at, anton.ivanov@cambridgegreys.com,
	johannes@sipsolutions.net, sfr@canb.auug.org.au,
	linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
	machel@vivo.com
Cc: opensource.kernel@vivo.com, Minjie Du <duminjie@vivo.com>
Subject: [PATCH v1] drivers: use free_netdev before return
Date: Mon,  3 Jul 2023 17:41:35 +0800	[thread overview]
Message-ID: <20230703094135.6443-1-duminjie@vivo.com> (raw)

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


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

             reply	other threads:[~2023-07-03  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  9:41 Minjie Du [this message]
2023-07-03 10:12 ` [PATCH v1] drivers: use free_netdev before return Anton Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230703094135.6443-1-duminjie@vivo.com \
    --to=duminjie@vivo.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=machel@vivo.com \
    --cc=opensource.kernel@vivo.com \
    --cc=richard@nod.at \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).