From: Jens Axboe <axboe@kernel.dk>
To: Wenwen Wang <wang6495@umn.edu>
Cc: Maurizio Lombardi <mlombard@redhat.com>,
zhong jiang <zhongjiang@huawei.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gdrom: fix a memory leak bug
Date: Sat, 29 Dec 2018 08:21:58 -0700 [thread overview]
Message-ID: <f0ef28cb-7f4e-e346-7b88-aaf85ae0b5f5@kernel.dk> (raw)
In-Reply-To: <1545876914-11283-1-git-send-email-wang6495@umn.edu>
On 12/26/18 7:15 PM, Wenwen Wang wrote:
> In probe_gdrom(), the buffer pointed by 'gd.cd_info' is allocated through
> kzalloc() and is used to hold the information of the gdrom device. To
> register and unregister the device, the pointer 'gd.cd_info' is passed to
> the functions register_cdrom() and unregister_cdrom(), respectively.
> However, this buffer is not freed after it is used, which can cause a
> memory leak bug.
>
> This patch simply frees the buffer 'gd.cd_info' in exit_gdrom() to fix the
> above issue.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2018-12-29 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-27 2:15 [PATCH] gdrom: fix a memory leak bug Wenwen Wang
2018-12-29 15:21 ` Jens Axboe [this message]
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=f0ef28cb-7f4e-e346-7b88-aaf85ae0b5f5@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mlombard@redhat.com \
--cc=wang6495@umn.edu \
--cc=zhongjiang@huawei.com \
/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).