From: Jianbo Liu Date: Fri, 4 Nov 2016 09:46:43 +0000 (+0530) Subject: eal/ppc: fix file descriptor leak when getting CPU features X-Git-Tag: spdx-start~5403 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=545f16daf6867640261fe7bd263c777a8c61a3c1;p=dpdk.git eal/ppc: fix file descriptor leak when getting CPU features Close the file descriptor after finish using it. Fixes: 9ae15538 ("eal/ppc: cpu flag checks for IBM Power") Signed-off-by: Jianbo Liu Acked-by: Jan Viktorin --- 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 a8147c86c7..fcf96e045f 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); } /*