pci: Fix the crash on deleting the pci device 35/18635/2
authorMohsin Kazmi <sykazmi@cisco.com>
Tue, 2 Apr 2019 11:09:49 +0000 (11:09 +0000)
committerDamjan Marion <dmarion@me.com>
Wed, 3 Apr 2019 14:42:37 +0000 (14:42 +0000)
commit692f9b1205be8e61c0782b0711ec2393f8203e3e
tree16b0bfe32a202cbdae51302f36859389ef6350eb
parent211ef2eb24752faeb8a8cb1e3e727e008acf921e
pci: Fix the crash on deleting the pci device

clib_file_index is 0 if it is not initialized result in
following assertion on deleteing the pci device.

vpp/src/vppinfra/file.h:122 (clib_file_del_by_index) assertion `! pool_is_free (um->file_pool, _e)' fails

This patch fixes the issue by initializing the clib_file_index to -1.

Change-Id: I51d23f18e7ccf3143a4765d05aafc1363a007737
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
src/vlib/linux/pci.c