diff mbox series

iASL: Fix incorrect memory allocation

Message ID 20170904120519.25448-1-colin.king@canonical.com
State Accepted
Headers show
Series iASL: Fix incorrect memory allocation | expand

Commit Message

Colin Ian King Sept. 4, 2017, 12:05 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Was using UtLocalCalloc instead of UtStringCacheCalloc.
Reported by Colin Ian King.
ACPICA BZ 1416

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpica/source/compiler/asldebug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung Sept. 5, 2017, 5:29 a.m. UTC | #1
On 2017-09-04 05:05 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Was using UtLocalCalloc instead of UtStringCacheCalloc.
> Reported by Colin Ian King.
> ACPICA BZ 1416
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpica/source/compiler/asldebug.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpica/source/compiler/asldebug.c b/src/acpica/source/compiler/asldebug.c
> index 684e2224..9640a841 100644
> --- a/src/acpica/source/compiler/asldebug.c
> +++ b/src/acpica/source/compiler/asldebug.c
> @@ -356,7 +356,7 @@ UtCreateEscapeSequences (
>   
>       /* New string buffer, 3 extra chars per escape (4 total) */
>   
> -    OutString = UtLocalCalloc (InStringLength + (EscapeCount * 3));
> +    OutString = UtStringCacheCalloc (InStringLength + (EscapeCount * 3));
>       OutStringPtr = OutString;
>   
>       /* Convert non-ascii or non-printable chars to escape sequences */
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Sept. 6, 2017, 8:17 a.m. UTC | #2
On 09/04/2017 08:05 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Was using UtLocalCalloc instead of UtStringCacheCalloc.
> Reported by Colin Ian King.
> ACPICA BZ 1416
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpica/source/compiler/asldebug.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpica/source/compiler/asldebug.c b/src/acpica/source/compiler/asldebug.c
> index 684e2224..9640a841 100644
> --- a/src/acpica/source/compiler/asldebug.c
> +++ b/src/acpica/source/compiler/asldebug.c
> @@ -356,7 +356,7 @@ UtCreateEscapeSequences (
>   
>       /* New string buffer, 3 extra chars per escape (4 total) */
>   
> -    OutString = UtLocalCalloc (InStringLength + (EscapeCount * 3));
> +    OutString = UtStringCacheCalloc (InStringLength + (EscapeCount * 3));
>       OutStringPtr = OutString;
>   
>       /* Convert non-ascii or non-printable chars to escape sequences */
> 

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/acpica/source/compiler/asldebug.c b/src/acpica/source/compiler/asldebug.c
index 684e2224..9640a841 100644
--- a/src/acpica/source/compiler/asldebug.c
+++ b/src/acpica/source/compiler/asldebug.c
@@ -356,7 +356,7 @@  UtCreateEscapeSequences (
 
     /* New string buffer, 3 extra chars per escape (4 total) */
 
-    OutString = UtLocalCalloc (InStringLength + (EscapeCount * 3));
+    OutString = UtStringCacheCalloc (InStringLength + (EscapeCount * 3));
     OutStringPtr = OutString;
 
     /* Convert non-ascii or non-printable chars to escape sequences */