DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stefan Baranoff <sbaranoff@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/pcap: fix memory leak from missing pcap_close
Date: Tue, 7 Nov 2017 00:53:06 -0800	[thread overview]
Message-ID: <0847abc0-1629-87f8-4afd-db22c010aaeb@intel.com> (raw)
In-Reply-To: <d5b2c117-af98-2e64-ace8-547d486cb2dc@intel.com>

On 11/6/2017 11:52 AM, Ferruh Yigit wrote:
> On 11/5/2017 9:24 AM, Stefan Baranoff wrote:
>> In open_single_tx_pcap there is a call to pcap_open_dead which calls
>> malloc to create and return a pcap_t. That object is never freed in
>> this case. Other places it is freed by passing it back similar to the
>> way the pcap_dumper_t is in this case.
>>
>> The pcap_t is only used to create the pcap_dumper_t and is never used
>> again so freeing it here is safe and much simpler than trying to pass
>> it back to be freed in eth_dev_stop along with the other
>> pcap_t/pcap_dumper_t objects.
>>
>> Signed-off-by: Stefan Baranoff <sbaranoff@gmail.com>
> 
> net/pcap: fix memory leak in dumper open
> 
> Fixes: 4c173302c307 ("pcap: add new driver")
> Cc: stable@dpdk.org
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

      reply	other threads:[~2017-11-07  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05 17:24 Stefan Baranoff
2017-11-06 19:52 ` Ferruh Yigit
2017-11-07  8:53   ` Ferruh Yigit [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=0847abc0-1629-87f8-4afd-db22c010aaeb@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=sbaranoff@gmail.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).