diff options
author | Eric Anholt <eric@anholt.net> | 2007-03-01 10:49:13 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-03-01 15:27:32 -0800 |
commit | 09be109c223b93d74ea3cc7a12d9a22b44990a14 (patch) | |
tree | 3e54190d58270f0175440c20e1020aacd8f3c3b6 /src | |
parent | f6502eee20205ec14ce6499251a28962cc36fdd6 (diff) | |
download | libpciaccess-09be109c223b93d74ea3cc7a12d9a22b44990a14.tar.gz libpciaccess-09be109c223b93d74ea3cc7a12d9a22b44990a14.tar.bz2 libpciaccess-09be109c223b93d74ea3cc7a12d9a22b44990a14.zip |
FreeBSD: Add system cleanup function.
Diffstat (limited to 'src')
-rw-r--r-- | src/freebsd_pci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index a7d5c05..a4a8f44 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -319,8 +319,17 @@ pci_device_freebsd_probe( struct pci_device * dev ) return 0; } +static void +pci_system_freebsd_destroy() +{ + close(freebsd_pci_sys->pcidev); + free(freebsd_pci_sys->pci_sys.devices); + free(freebsd_pci_sys); + freebsd_pci_sys = NULL; +} + static const struct pci_system_methods freebsd_pci_methods = { - .destroy = NULL, /* XXX: free memory */ + .destroy = pci_system_freebsd_destroy, .destroy_device = NULL, .read_rom = NULL, /* XXX: Fill me in */ .probe = pci_device_freebsd_probe, |