Blame SOURCES/bc-1.06.95-memleak.patch

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