DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yangchao Zhou <zhouyates@gmail.com>
To: dev@dpdk.org
Cc: alejandro.lucero@netronome.com
Subject: [dpdk-dev] [PATCH] net/nfp: fix possible resource leak
Date: Tue, 17 Apr 2018 13:59:08 +0800	[thread overview]
Message-ID: <1523944748-13334-1-git-send-email-zhouyates@gmail.com> (raw)

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index ad6ce72..f2fcc4a 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -816,6 +816,7 @@ struct nfp6000_area_priv {
 
 	if (fscanf(fp, "0x%lx 0x%lx 0x%lx", &start, &end, &flags) == 0) {
 		printf("error reading resource file for bar size\n");
+		fclose(fp);
 		return -1;
 	}
 
-- 
1.7.1

             reply	other threads:[~2018-04-17  5:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17  5:59 Yangchao Zhou [this message]
2018-04-17  9:07 ` Alejandro Lucero
2018-04-17 14:07   ` Ferruh Yigit

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=1523944748-13334-1-git-send-email-zhouyates@gmail.com \
    --to=zhouyates@gmail.com \
    --cc=alejandro.lucero@netronome.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).