From: Jianbo Liu <jianbo.liu@linaro.org>
To: dev@dpdk.org, chaozhu@linux.vnet.ibm.com, viktorin@rehivetech.com
Cc: Jianbo Liu <jianbo.liu@linaro.org>
Subject: [dpdk-dev] [PATCH v2 2/2] arch/ppc: fix file descriptor leakage when getting CPU features
Date: Fri, 4 Nov 2016 15:16:43 +0530 [thread overview]
Message-ID: <1478252803-14672-2-git-send-email-jianbo.liu@linaro.org> (raw)
In-Reply-To: <1478252803-14672-1-git-send-email-jianbo.liu@linaro.org>
close the file descriptor after finish using it.
Fixes: 9ae15538 (eal/ppc: cpu flag checks for IBM Power)
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
---
lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
index a8147c8..fcf96e0 100644
--- a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
@@ -116,6 +116,7 @@ rte_cpu_get_features(hwcap_registers_t out)
else if (auxv.a_type == AT_HWCAP2)
out[REG_HWCAP2] = auxv.a_un.a_val;
}
+ close(auxv_fd);
}
/*
--
2.4.11
next prev parent reply other threads:[~2016-11-04 9:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 6:29 [dpdk-dev] [PATCH 1/2] arch/arm: fix file descriptors " Jianbo Liu
2016-11-04 6:29 ` [dpdk-dev] [PATCH 2/2] arch/ppc: " Jianbo Liu
2016-11-04 7:26 ` viktorin
2016-11-04 7:24 ` [dpdk-dev] [PATCH 1/2] arch/arm: " viktorin
2016-11-04 9:20 ` Jianbo Liu
2016-11-04 9:46 ` [dpdk-dev] [PATCH v2 1/2] arch/arm: fix file descriptor " Jianbo Liu
2016-11-04 9:46 ` Jianbo Liu [this message]
2016-11-04 11:18 ` [dpdk-dev] [PATCH v2 2/2] arch/ppc: " Jan Viktorin
2016-11-06 21:44 ` Thomas Monjalon
2016-11-04 11:19 ` [dpdk-dev] [PATCH v2 1/2] arch/arm: " Jan Viktorin
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=1478252803-14672-2-git-send-email-jianbo.liu@linaro.org \
--to=jianbo.liu@linaro.org \
--cc=chaozhu@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=viktorin@rehivetech.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).