Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/acpitools/aml fix acpidump segfault
details: https://anonhg.NetBSD.org/src/rev/71d0ad7f07aa
branches: trunk
changeset: 747994:71d0ad7f07aa
user: cegger <cegger%NetBSD.org@localhost>
date: Thu Oct 08 13:16:13 2009 +0000
description:
fix acpidump segfault
diffstat:
usr.sbin/acpitools/aml/aml_name.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r e85f34f2246f -r 71d0ad7f07aa usr.sbin/acpitools/aml/aml_name.c
--- a/usr.sbin/acpitools/aml/aml_name.c Thu Oct 08 08:57:19 2009 +0000
+++ b/usr.sbin/acpitools/aml/aml_name.c Thu Oct 08 13:16:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aml_name.c,v 1.3 2008/01/15 19:08:00 jmcneill Exp $ */
+/* $NetBSD: aml_name.c,v 1.4 2009/10/08 13:16:13 cegger Exp $ */
/*-
* Copyright (c) 1999 Takanori Watanabe
@@ -31,7 +31,7 @@
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_name.c,v 1.3 2000/11/09 06:24:45 iwasaki Exp $
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: aml_name.c,v 1.3 2008/01/15 19:08:00 jmcneill Exp $");
+__RCSID("$NetBSD: aml_name.c,v 1.4 2009/10/08 13:16:13 cegger Exp $");
#include <sys/param.h>
@@ -283,11 +283,12 @@
newname->parent = parent;
newname->child = NULL;
newname->property = NULL;
- if (parent->child)
+ if (parent && parent->child)
newname->brother = parent->child;
else
newname->brother = NULL;
- parent->child = newname;
+ if (parent)
+ parent->child = newname;
newname->chain = name_group_list->head;
name_group_list->head = newname;
Home |
Main Index |
Thread Index |
Old Index