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/compiler CID 1256503: Handle me...
details: https://anonhg.NetBSD.org/src/rev/40a1e29e07bc
branches: trunk
changeset: 338055:40a1e29e07bc
user: christos <christos%NetBSD.org@localhost>
date: Sat May 09 15:24:56 2015 +0000
description:
CID 1256503: Handle memory leak
diffstat:
sys/external/bsd/acpica/dist/compiler/aslcompiler.h | 5 +++++
sys/external/bsd/acpica/dist/compiler/aslopcodes.c | 1 +
sys/external/bsd/acpica/dist/compiler/aslutils.c | 20 ++++++++++++++++++++
3 files changed, 26 insertions(+), 0 deletions(-)
diffs (56 lines):
diff -r 414a9af65d42 -r 40a1e29e07bc sys/external/bsd/acpica/dist/compiler/aslcompiler.h
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.h Sat May 09 15:22:47 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.h Sat May 09 15:24:56 2015 +0000
@@ -945,6 +945,11 @@
UINT32 Size);
void
+UtLocalFree (
+ void *Allocated,
+ UINT32 Size);
+
+void
UtPrintFormattedName (
UINT16 ParseOpcode,
UINT32 Level);
diff -r 414a9af65d42 -r 40a1e29e07bc sys/external/bsd/acpica/dist/compiler/aslopcodes.c
--- a/sys/external/bsd/acpica/dist/compiler/aslopcodes.c Sat May 09 15:22:47 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopcodes.c Sat May 09 15:24:56 2015 +0000
@@ -1358,6 +1358,7 @@
Node = Node->Asl.Next;
}
+ UtLocalFree (Buffer, ACPI_PLD_BUFFER_SIZE);
Buffer = OpcEncodePldBuffer(&PldInfo);
/* Change Op to a Buffer */
diff -r 414a9af65d42 -r 40a1e29e07bc sys/external/bsd/acpica/dist/compiler/aslutils.c
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c Sat May 09 15:22:47 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c Sat May 09 15:24:56 2015 +0000
@@ -178,6 +178,26 @@
return (Allocated);
}
+/*******************************************************************************
+ *
+ * FUNCTION: UtLocalFree
+ *
+ * PARAMETERS: Allocated - Pointer to be released
+ * PARAMETERS: Size - Bytes to be released
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Free memory previously allocated
+ *
+ ******************************************************************************/
+void
+UtLocalFree (
+ void *Allocated, UINT32 Size)
+{
+ ACPI_FREE (Allocated);
+ TotalAllocations--;
+ TotalAllocated -= Size;
+}
/*******************************************************************************
*
Home |
Main Index |
Thread Index |
Old Index