Skip to content

Commit

Permalink
ACPICA: Fix possible dereference of null pointer
Browse files Browse the repository at this point in the history
Fix dereference of possibly null pointer "Predefined" in the case
where the method is not one of the predefined methods.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed May 27, 2009
1 parent b21245a commit 6525909
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/acpi/acpica/nspredef.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,

pathname = acpi_ns_get_external_pathname(node);
if (!pathname) {
pathname = ACPI_CAST_PTR(char, predefined->info.name);
return AE_OK; /* Could not get pathname, ignore */
}

/*
Expand Down Expand Up @@ -230,10 +230,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
}

exit:
if (pathname != predefined->info.name) {
ACPI_FREE(pathname);
}

ACPI_FREE(pathname);
return (status);
}

Expand Down

0 comments on commit 6525909

Please sign in to comment.