aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Roosen <henri.roosen@sigmatek.at>2011-09-07 09:16:11 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2012-03-12 14:18:52 -0700
commit03b7abe21e916d15eb381c17aeb153734fdfb7db (patch)
tree280f0b70f3f642ab51615b1d5b6b8daa48da9bf1
parentd0564771471d41dce35d4c8b37ab6845930c3354 (diff)
downloadsyslinux-03b7abe21e916d15eb381c17aeb153734fdfb7db.tar.gz
syslinux-03b7abe21e916d15eb381c17aeb153734fdfb7db.tar.xz
syslinux-03b7abe21e916d15eb381c17aeb153734fdfb7db.zip
com32/lib/pci/scan.c: Fix free_pci_domain()
free_pci_domain is releasing the memory too early; should be out of the for loops, because in the loop the memory is still dereferenced.
-rw-r--r--com32/lib/pci/scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c
index e0974f98..fe00fc25 100644
--- a/com32/lib/pci/scan.c
+++ b/com32/lib/pci/scan.c
@@ -579,14 +579,14 @@ void free_pci_domain(struct pci_domain *domain)
free(func->dev_info);
free(func);
}
- free(slot);
}
+ free(slot);
}
- free(bus);
}
+ free(bus);
}
- free(domain);
}
+ free(domain);
}
}