Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi/wmi Fix a potential NULL pointer dereference.
details: https://anonhg.NetBSD.org/src/rev/1519332b047f
branches: trunk
changeset: 753749:1519332b047f
user: jruoho <jruoho%NetBSD.org@localhost>
date: Fri Apr 09 04:48:23 2010 +0000
description:
Fix a potential NULL pointer dereference.
diffstat:
sys/dev/acpi/wmi/wmi_acpi.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 86959cf50713 -r 1519332b047f sys/dev/acpi/wmi/wmi_acpi.c
--- a/sys/dev/acpi/wmi/wmi_acpi.c Fri Apr 09 04:34:13 2010 +0000
+++ b/sys/dev/acpi/wmi/wmi_acpi.c Fri Apr 09 04:48:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wmi_acpi.c,v 1.2 2010/04/08 12:36:21 jruoho Exp $ */
+/* $NetBSD: wmi_acpi.c,v 1.3 2010/04/09 04:48:23 jruoho Exp $ */
/*-
* Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.2 2010/04/08 12:36:21 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.3 2010/04/09 04:48:23 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -501,14 +501,14 @@
ACPI_OBJECT obj;
ACPI_HANDLE hdl;
- hdl = sc->sc_node->ad_handle;
-
if (sc == NULL || obuf == NULL)
return AE_BAD_PARAMETER;
if (sc->sc_handler == NULL)
return AE_ABORT_METHOD;
+ hdl = sc->sc_node->ad_handle;
+
obj.Type = ACPI_TYPE_INTEGER;
obj.Integer.Value = event;
Home |
Main Index |
Thread Index |
Old Index