From: Jens Axboe <axboe@kernel.dk>
To: Zheng Bin <zhengbin13@huawei.com>,
mchristi@redhat.com, ebiggers@kernel.org, josef@toxicpanda.com,
navid.emamdoost@gmail.com, linux-block@vger.kernel.org,
nbd@other.debian.org, linux-kernel@vger.kernel.org
Cc: yi.zhang@huawei.com
Subject: Re: [PATCH v4] nbd: Fix memory leak in nbd_add_socket
Date: Wed, 8 Jul 2020 15:42:35 -0600 [thread overview]
Message-ID: <5a7597c2-2d51-8382-5b60-73cd39e55fda@kernel.dk> (raw)
In-Reply-To: <20200629012349.26641-1-zhengbin13@huawei.com>
On 6/28/20 7:23 PM, Zheng Bin wrote:
> When adding first socket to nbd, if nsock's allocation failed, the data
> structure member "config->socks" was reallocated, but the data structure
> member "config->num_connections" was not updated. A memory leak will occur
> then because the function "nbd_config_put" will free "config->socks" only
> when "config->num_connections" is not zero.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-07-08 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 1:23 Zheng Bin
2020-07-08 20:32 ` Eric Biggers
2020-07-08 21:42 ` 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=5a7597c2-2d51-8382-5b60-73cd39e55fda@kernel.dk \
--to=axboe@kernel.dk \
--cc=ebiggers@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=navid.emamdoost@gmail.com \
--cc=nbd@other.debian.org \
--cc=yi.zhang@huawei.com \
--cc=zhengbin13@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
all inboxes | Powered by JetHome®