|
@@ -42,7 +42,7 @@ Value *makeFunctionValue(Statement *st, Parameter *pt, VarList *var_list, Inter
|
|
|
tmp = makeValue(inter);
|
|
|
tmp->type = function;
|
|
|
tmp->data.function.function = st;
|
|
|
- tmp->data.function.pt = pt;
|
|
|
+ tmp->data.function.pt = copyParameter(pt);
|
|
|
tmp->data.function.var = copyVarList(var_list, false, inter);
|
|
|
return tmp;
|
|
|
}
|
|
@@ -97,7 +97,7 @@ void freeValue(Value *value, Inter *inter){
|
|
|
break;
|
|
|
case function: {
|
|
|
VarList *tmp = value->data.function.var;
|
|
|
- freeParameter(value->data.function.pt, true);
|
|
|
+ freeParameter(value->data.function.pt, false);
|
|
|
while (tmp != NULL)
|
|
|
tmp = freeVarList(tmp, true);
|
|
|
break;
|