diff options
author | sos <sos@FreeBSD.org> | 2001-02-08 21:59:27 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2001-02-08 21:59:27 +0000 |
commit | 3260df3778da194c2f65fb8f9c2fdac3897067d7 (patch) | |
tree | 5f1830f297f8e59bce1d15550b3b029fece90251 /sys | |
parent | 1272fd4764bc2519d71f9dcfbf5704c3f77bbb9f (diff) | |
download | FreeBSD-src-3260df3778da194c2f65fb8f9c2fdac3897067d7.zip FreeBSD-src-3260df3778da194c2f65fb8f9c2fdac3897067d7.tar.gz |
Fix a memory leak.
Pointed out by: Asmodai
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-all.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 8a507d4..6e1e864 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -758,18 +758,17 @@ static int ata_pcisub_probe(device_t dev) { struct ata_softc *scp = device_get_softc(dev); - device_t *list; + device_t *children; int count, i; /* find channel number on this controller */ - device_get_children(device_get_parent(dev), &list, &count); + device_get_children(device_get_parent(dev), &children, &count); for (i = 0; i < count; i++) { - if (list[i] == dev) + if (children[i] == dev) scp->channel = i; } - + free(children, M_TEMP); scp->chiptype = pci_get_devid(device_get_parent(dev)); - return ata_probe(dev); } |