avoid file descriptor leak when fd == 0
* src/pci.c (pciGetDevice): Initialize dev->fd to -1, not 0. (pciFreeDevice): Close fd also when it is 0.
Showing
想要评论请 注册 或 登录
* src/pci.c (pciGetDevice): Initialize dev->fd to -1, not 0. (pciFreeDevice): Close fd also when it is 0.