eal: fix invalid memory read
Valgrind reports this issue:
==29880== Invalid read of size 1
==29880== at 0x56FF9A5: cpu_socket_id (eal_lcore.c:101)
==29880== by 0x56FFAE9: rte_eal_cpu_init (eal_lcore.c:168)
==29880== by 0x56F944A: rte_eal_init (eal.c:975)
The problem is that endptr points to memory allocated underneath the DIR
handle, which has already been freed. So move the closedir() call lower.
Signed-off-by: Aaron Campbell <aaron@arbor.net>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>