aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/linux/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/linux/pci.c')
-rw-r--r--src/vlib/linux/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index 127d2ef167a..11480ca081c 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -919,8 +919,9 @@ error:
{
if (p->fd != -1)
close (p->fd);
- if (p->config_fd != -1)
+ if (p->config_fd != -1 && p->config_fd != p->fd)
close (p->config_fd);
+ p->config_fd = p->fd = -1;
}
return err;
}