From: David Miller <davem@davemloft.net>
To: maowenan@huawei.com
Cc: edumazet@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru
Subject: Re: question about memory leak in ip_mc_del1_src
Date: Tue, 05 Mar 2019 09:00:20 -0800 (PST) [thread overview]
Message-ID: <20190305.090020.1424252324111549025.davem@davemloft.net> (raw)
In-Reply-To: <3f48c0a1-f523-ac55-451a-2460050b0ee3@huawei.com>
From: maowenan <maowenan@huawei.com>
Date: Tue, 5 Mar 2019 11:33:03 +0800
>
>
> On 2019/3/5 2:16, David Miller wrote:
>> From: maowenan <maowenan@huawei.com>
>> Date: Mon, 4 Mar 2019 20:47:42 +0800
>>
>>> pmc->tomb = psf;
>>> rv = 1; //if it does not kfree(psf), will it lead to memory leak after this line?
>>
>> pmc->tomb points to psf, why should we free it?
>
> Thank you David.
> Yes, pmc->tomb points to psf, but this is a delete path
> for ip_mc_add1_src, if we don't free psf, where it can be done?
When the 'pmc' object is destroyed.
prev parent reply other threads:[~2019-03-05 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 12:47 question about memory leak in ip_mc_del1_src maowenan
2019-03-04 18:16 ` David Miller
2019-03-05 3:33 ` maowenan
2019-03-05 17:00 ` David Miller [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=20190305.090020.1424252324111549025.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=maowenan@huawei.com \
--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).