summaryrefslogtreecommitdiff
path: root/source/components/parser/psargs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/parser/psargs.c')
-rw-r--r--source/components/parser/psargs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c
index 5e2e43414..a0486bccb 100644
--- a/source/components/parser/psargs.c
+++ b/source/components/parser/psargs.c
@@ -966,6 +966,13 @@ AcpiPsGetNextArg (
{
Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 0);
}
+
+ /* Clean possibly allocated argument */
+ if (ACPI_FAILURE (Status) && (Arg != NULL))
+ {
+ AcpiPsFreeOp (Arg);
+ Arg = NULL;
+ }
}
else
{