From 43ada84483fa0a8b95ee3bd95717ae2a33ec7a12bb12897919064fcf061c699f Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 26 Jul 2017 12:17:31 +0000 Subject: [PATCH] Update memory_fixes.patch with upstream patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/nasm?expand=0&rev=32 --- memory_fixes.patch | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/memory_fixes.patch b/memory_fixes.patch index fcc70cd..5e56eb5 100644 --- a/memory_fixes.patch +++ b/memory_fixes.patch @@ -12,15 +12,17 @@ Index: nasm-2.13.01/asm/preproc.c =================================================================== --- nasm-2.13.01.orig/asm/preproc.c +++ nasm-2.13.01/asm/preproc.c -@@ -1257,6 +1257,7 @@ static char *detoken(Token * tlist, bool - char *q = t->text; +@@ -1280,8 +1280,8 @@ static char *detoken(Token * tlist, bool + t->text = nasm_zalloc(2); + } else + t->text = nasm_strdup(p); ++ nasm_free(q); + } +- nasm_free(q); + } - v = t->text + 2; -+ t->text = NULL; - if (*v == '\'' || *v == '\"' || *v == '`') { - size_t len = nasm_unquote(v, NULL); - size_t clen = strlen(v); -@@ -3845,9 +3846,15 @@ static bool paste_tokens(Token **head, c + /* Expand local macros here and not during preprocessing */ +@@ -3845,9 +3845,15 @@ static bool paste_tokens(Token **head, c len += strlen(tok->text); p = buf = nasm_malloc(len + 1); @@ -38,7 +40,7 @@ Index: nasm-2.13.01/asm/preproc.c tok = delete_Token(tok); } -@@ -5095,8 +5102,9 @@ static char *pp_getline(void) +@@ -5095,8 +5101,9 @@ static char *pp_getline(void) nasm_free(m->paramlen); l->finishes->in_progress = 0; }