mirror of
https://github.com/acpica/acpica/
synced 2024-12-27 12:49:46 +03:00
iASL/Disassembler: Fix some possible memory leaks.
Fix for a few possible memory leaks in error recovery paths Reported by Colin King <colin.king@canonical.com>
This commit is contained in:
parent
48edcb1179
commit
50bf399c8e
@ -738,6 +738,7 @@ AcpiGetTagPathname (
|
||||
Status = AcpiNsBuildExternalPath (BufferNode, RequiredSize, Pathname);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_FREE (Pathname);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
@ -539,12 +539,13 @@ DtCompileBuffer (
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
DtError (ASL_ERROR, ASL_MSG_BUFFER_ELEMENT, Field, MsgBuffer);
|
||||
return (ByteLength - Count);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
Buffer[i] = (UINT8) Value;
|
||||
}
|
||||
|
||||
Exit:
|
||||
ACPI_FREE (StringValue);
|
||||
return (ByteLength - Count);
|
||||
}
|
||||
|
@ -1200,4 +1200,5 @@ DtWriteTableToListing (
|
||||
AcpiUtDumpBuffer (Buffer, Gbl_TableLength, DB_BYTE_DISPLAY, 0);
|
||||
|
||||
AcpiOsRedirectOutput (stdout);
|
||||
ACPI_FREE (Buffer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user