Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Initialize pointers to NULL to avoid accidental...
details: https://anonhg.NetBSD.org/src/rev/4939d3ffee90
branches: trunk
changeset: 758433:4939d3ffee90
user: jruoho <jruoho%NetBSD.org@localhost>
date: Thu Nov 04 20:08:12 2010 +0000
description:
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.
diffstat:
sys/dev/acpi/acpi_display.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 498f1eda0367 -r 4939d3ffee90 sys/dev/acpi/acpi_display.c
--- a/sys/dev/acpi/acpi_display.c Thu Nov 04 17:03:20 2010 +0000
+++ b/sys/dev/acpi/acpi_display.c Thu Nov 04 20:08:12 2010 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
#include <sys/device.h>
@@ -1416,6 +1416,7 @@
return NULL;
oi = NULL;
+ pkg = NULL;
rv = acpidisp_eval_package(hdl, "_DOD", &pkg, 1);
if (ACPI_FAILURE(rv))
@@ -1600,6 +1601,7 @@
return NULL;
bc = NULL;
+ pkg = NULL;
rv = acpidisp_eval_package(hdl, "_BCL", &pkg, 2);
if (ACPI_FAILURE(rv))
Home |
Main Index |
Thread Index |
Old Index