diff options
-rw-r--r-- | src/freebsd_pci.c | 2 | ||||
-rw-r--r-- | src/netbsd_pci.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 3794328..709bfb6 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -663,12 +663,14 @@ pci_system_freebsd_create( void ) if ( ioctl( pcidev, PCIOCGETCONF, &pciconfio ) == -1) { free( pci_sys ); + pci_sys = NULL; close( pcidev ); return errno; } if (pciconfio.status == PCI_GETCONF_ERROR ) { free( pci_sys ); + pci_sys = NULL; close( pcidev ); return EINVAL; } diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c index 1f3bcea..b6a5ccd 100644 --- a/src/netbsd_pci.c +++ b/src/netbsd_pci.c @@ -942,6 +942,7 @@ pci_system_netbsd_create(void) for (i = 0; i < nbuses; i++) close(buses[i].fd); free(pci_sys); + pci_sys = NULL; return ENOMEM; } |