Blame SOURCES/bc-1.06.95-memleak.patch

747aaa
diff --git a/bc/bc.y b/bc/bc.y
747aaa
index 14dc4be..bd91c38 100644
747aaa
--- a/bc/bc.y
747aaa
+++ b/bc/bc.y
747aaa
@@ -569,6 +569,7 @@ expression		:  named_expression ASSIGN_OP
747aaa
 				    generate (">");
747aaa
 				  break;
747aaa
 				}
747aaa
+			      free($2);
747aaa
 			    }
747aaa
 			| expression '+' expression
747aaa
 			    {
747aaa
diff --git a/bc/util.c b/bc/util.c
747aaa
index 30beaf9..26e2e85 100644
747aaa
--- a/bc/util.c
747aaa
+++ b/bc/util.c
747aaa
@@ -602,8 +602,7 @@ lookup (name, namekind)
747aaa
     case FUNCTDEF:
747aaa
       if (id->f_name != 0)
747aaa
 	{
747aaa
-	  if (namekind != FUNCT)
747aaa
-	    free(name);
747aaa
+	  free(name);
747aaa
 	  /* Check to see if we are redefining a math lib function. */ 
747aaa
 	  if (use_math && namekind == FUNCTDEF && id->f_name <= 6)
747aaa
 	    id->f_name = next_func++;