[dpdk-dev,v2,2/2] arch/ppc: fix file descriptor leakage when getting CPU features
Checks
Context |
Check |
Description |
tmonjalo/checkpatch |
success
|
coding style OK
|
Commit Message
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(+)
Comments
On Fri, 4 Nov 2016 15:16:43 +0530
Jianbo Liu <jianbo.liu@linaro.org> wrote:
> close the file descriptor after finish using it.
s/close/Close/
Please include my ack (below).
Jan
>
> Fixes: 9ae15538 (eal/ppc: cpu flag checks for IBM Power)
>
> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
2016-11-04 12:18, Jan Viktorin:
> On Fri, 4 Nov 2016 15:16:43 +0530
> Jianbo Liu <jianbo.liu@linaro.org> wrote:
>
> > close the file descriptor after finish using it.
>
> s/close/Close/
>
> Please include my ack (below).
>
> Jan
>
> >
> > Fixes: 9ae15538 (eal/ppc: cpu flag checks for IBM Power)
> >
> > Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
>
> Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Applied, thanks
@@ -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);
}
/*