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