netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Zhipeng Lu <alexious@zju.edu.cn>
Cc: Chas Williams <3chas3@gmail.com>,
	linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] atm: idt77252: fix a memleak in open_card_ubr0
Date: Thu, 1 Feb 2024 14:29:33 +0100	[thread overview]
Message-ID: <ZbucvTJswt41cpcI@nanopsycho> (raw)
In-Reply-To: <20240201124108.3052635-1-alexious@zju.edu.cn>

Thu, Feb 01, 2024 at 01:41:05PM CET, alexious@zju.edu.cn wrote:
>When alloc_scq fails, card->vcs[0] (i.e. vc) should be freed. Otherwise,
>in the following call chain:
>
>idt77252_init_one
>  |-> idt77252_dev_open
>        |-> open_card_ubr0
>              |-> alloc_scq [failed]
>  |-> deinit_card
>        |-> vfree(card->vcs);
>
>card->vcs is freed and card->vcs[0] is leaked.
>
>Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
>Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  reply	other threads:[~2024-02-01 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 12:41 [PATCH] atm: idt77252: fix a memleak in open_card_ubr0 Zhipeng Lu
2024-02-01 13:29 ` Jiri Pirko [this message]
2024-02-03 12:50 ` patchwork-bot+netdevbpf

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=ZbucvTJswt41cpcI@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=3chas3@gmail.com \
    --cc=alexious@zju.edu.cn \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 NNTP newsgroup(s).