First check in
This commit is contained in:
24
SRC/patches/02_fix-memory-leak.patch
Normal file
24
SRC/patches/02_fix-memory-leak.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff -purN a/bc/bc.y b/bc/bc.y
|
||||
--- a/bc/bc.y 2006-09-04 21:39:31.000000000 -0500
|
||||
+++ b/bc/bc.y 2016-09-09 13:02:41.476000000 -0500
|
||||
@@ -569,6 +569,7 @@ expression : named_expression ASSIGN_O
|
||||
generate (">");
|
||||
break;
|
||||
}
|
||||
+ free($2);
|
||||
}
|
||||
| expression '+' expression
|
||||
{
|
||||
diff -purN a/bc/util.c b/bc/util.c
|
||||
--- a/bc/util.c 2006-09-04 21:39:31.000000000 -0500
|
||||
+++ b/bc/util.c 2016-09-09 13:02:41.476000000 -0500
|
||||
@@ -602,8 +602,7 @@ lookup (name, namekind)
|
||||
case FUNCTDEF:
|
||||
if (id->f_name != 0)
|
||||
{
|
||||
- if (namekind != FUNCT)
|
||||
- free(name);
|
||||
+ free(name);
|
||||
/* Check to see if we are redefining a math lib function. */
|
||||
if (use_math && namekind == FUNCTDEF && id->f_name <= 6)
|
||||
id->f_name = next_func++;
|
||||
Reference in New Issue
Block a user