pci: fix musl crash 41/37841/3
authorBenoît Ganne <bganne@cisco.com>
Mon, 19 Dec 2022 17:23:03 +0000 (18:23 +0100)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 18 Jan 2023 00:38:09 +0000 (00:38 +0000)
commitcc16e7bad74c18b1a682329af5e760c4cd8381ea
tree7fc9602778155e7b851119a53833c112bf50d4e5
parenta35f56663fe6dde5da13fd52fa50a28080f6dd2f
pci: fix musl crash

The musl libc does not support closedir(0) resulting in a crash. Only
call closedir() if we successfully opened it.

Type: fix

Change-Id: I3198454f44735501047afc42b94b2fea273212f4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vlib/linux/pci.c