From 01720ae0de9776a6a78618c3503f9eaf5f120d91 Mon Sep 17 00:00:00 2001 From: jruoho Date: Thu, 4 Nov 2010 20:08:12 +0000 Subject: [PATCH] Initialize pointers to NULL to avoid accidentally free(9)'ing garbage. Should address the panic reported by Alan Bueno in PR # 44042. The root cause (an empty _DOD) is yet to be determined. --- sys/dev/acpi/acpi_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpi/acpi_display.c b/sys/dev/acpi/acpi_display.c index c1d056b6f882..a165a106c49a 100644 --- a/sys/dev/acpi/acpi_display.c +++ b/sys/dev/acpi/acpi_display.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_display.c,v 1.5 2010/10/29 09:04:38 gsutre Exp $ */ +/* $NetBSD: acpi_display.c,v 1.6 2010/11/04 20:08:12 jruoho Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.5 2010/10/29 09:04:38 gsutre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_display.c,v 1.6 2010/11/04 20:08:12 jruoho Exp $"); #include #include @@ -1416,6 +1416,7 @@ acpidisp_init_odinfo(const struct acpidisp_vga_softc *asc) return NULL; oi = NULL; + pkg = NULL; rv = acpidisp_eval_package(hdl, "_DOD", &pkg, 1); if (ACPI_FAILURE(rv)) @@ -1600,6 +1601,7 @@ acpidisp_init_brctl(const struct acpidisp_out_softc *osc) return NULL; bc = NULL; + pkg = NULL; rv = acpidisp_eval_package(hdl, "_BCL", &pkg, 2); if (ACPI_FAILURE(rv))