eal/arm: fix file descriptor leak when getting CPU features
authorJianbo Liu <jianbo.liu@linaro.org>
Fri, 4 Nov 2016 09:46:42 +0000 (15:16 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 6 Nov 2016 21:41:51 +0000 (22:41 +0100)
Close the file descriptor after finish using it.

Fixes: b94e5c94 ("eal/arm: add CPU flags for ARMv7")
Fixes: 97523f82 ("eal/arm: add CPU flags for ARMv8")

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
lib/librte_eal/common/arch/arm/rte_cpuflags.c

index 23240ef..79160a6 100644 (file)
@@ -148,6 +148,7 @@ rte_cpu_get_features(hwcap_registers_t out)
                                out[REG_PLATFORM] = 0x0001;
                }
        }
+       close(auxv_fd);
 }
 
 /*