Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist/dispatcher CID 1292510: Check a...
details: https://anonhg.NetBSD.org/src/rev/caee7148f3df
branches: trunk
changeset: 338057:caee7148f3df
user: christos <christos%NetBSD.org@localhost>
date: Sat May 09 15:31:36 2015 +0000
description:
CID 1292510: Check allocation
diffstat:
sys/external/bsd/acpica/dist/dispatcher/dsutils.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (24 lines):
diff -r ce205967a042 -r caee7148f3df sys/external/bsd/acpica/dist/dispatcher/dsutils.c
--- a/sys/external/bsd/acpica/dist/dispatcher/dsutils.c Sat May 09 15:28:25 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsutils.c Sat May 09 15:31:36 2015 +0000
@@ -604,10 +604,16 @@
/* TBD: May only be temporary */
ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
-
- ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
- Status = AE_OK;
- }
+ if (ObjDesc)
+ {
+ ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
+ Status = AE_OK;
+ }
+ else
+ {
+ Status = AE_NO_MEMORY;
+ }
+ }
else
{
/*
Home |
Main Index |
Thread Index |
Old Index