DPDK patches and discussions
 help / color / mirror / Atom feed
From: 周杨超 <zhouyates@gmail.com>
To: dev@dpdk.org
Cc: david.marchand@6wind.com
Subject: [dpdk-dev] [PATCH] pci: fix resource leak when detach pci device
Date: Sat, 6 Aug 2016 18:52:18 +0800	[thread overview]
Message-ID: <CABLiTuwb4qNxYtC_jmAfcXzDsuG03O8MzYxA3e_DjrdEk4gyhg@mail.gmail.com> (raw)

>From be6a6cc831d2b9e26c53ec6014138c3e3d5bffc1 Mon Sep 17 00:00:00 2001
From: zhouyangchao <zhouyates@gmail.com>
Date: Sat, 6 Aug 2016 17:45:51 +0800
Subject: [PATCH] pci: fix resource leak when detach pci device

Signed-off-by: zhouyangchao <zhouyates@gmail.com>
---
 lib/librte_eal/common/eal_common_pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/eal_common_pci.c
b/lib/librte_eal/common/eal_common_pci.c
index 40f4922..ef6b1c3 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -362,6 +362,7 @@ rte_eal_pci_detach(const struct rte_pci_addr *addr)
  goto err_return;

  TAILQ_REMOVE(&pci_device_list, dev, next);
+ free(dev);
  return 0;
  }
  return -1;
--

                 reply	other threads:[~2016-08-06 10:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CABLiTuwb4qNxYtC_jmAfcXzDsuG03O8MzYxA3e_DjrdEk4gyhg@mail.gmail.com \
    --to=zhouyates@gmail.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.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).