diff options
author | Alexander Kabaev <kan@FreeBSD.org> | 2003-12-18 17:04:11 +0000 |
---|---|---|
committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-12-18 17:04:11 +0000 |
commit | 2b26028dce5056747752d6ed8273af24c0700f61 (patch) | |
tree | 39cf11c7e381c39cc7915a6a9fe6b04cf6784cf6 /sys/dev/acpica/acpi_pcib.c | |
parent | 8caa8dd355aa46572df5dcfb9cda79be53dd06b9 (diff) |
Initialize acpi buffer structs early in order to avoid freeing
unallocated pointers later in done: section.
Notes
Notes:
svn path=/head/; revision=123642
Diffstat (limited to 'sys/dev/acpica/acpi_pcib.c')
-rw-r--r-- | sys/dev/acpica/acpi_pcib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index b3ebbfa100a4..065d5a6e75db 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -125,6 +125,9 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + buf.Pointer = NULL; + crsbuf.Pointer = NULL; + prsbuf.Pointer = NULL; interrupt = 255; /* ACPI numbers pins 0-3, not 1-4 like the BIOS */ @@ -184,7 +187,6 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, /* * Verify that this is a PCI link device, and that it's present. */ - buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; if (ACPI_FAILURE(AcpiGetObjectInfo(lnkdev, &buf))) { device_printf(pcib, "couldn't validate PCI interrupt link device %s\n", @@ -210,14 +212,12 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, /* * Get the current and possible resources for the interrupt link device. */ - crsbuf.Pointer = NULL; crsbuf.Length = ACPI_ALLOCATE_BUFFER; if (ACPI_FAILURE(status = AcpiGetCurrentResources(lnkdev, &crsbuf))) { device_printf(pcib, "couldn't get PCI interrupt link device _CRS data - %s\n", AcpiFormatException(status)); goto out; /* this is fatal */ } - prsbuf.Pointer = NULL; prsbuf.Length = ACPI_ALLOCATE_BUFFER; if (ACPI_FAILURE(status = AcpiGetPossibleResources(lnkdev, &prsbuf))) { device_printf(pcib, "couldn't get PCI interrupt link device _PRS data - %s\n", |