runtime: fix memory leaks

This commit is contained in:
2026-05-30 19:52:36 +01:00
parent 26b368a512
commit 96bf76aabc
9 changed files with 75 additions and 19 deletions
+3 -3
View File
@@ -29,10 +29,10 @@ static const fx_value *variable_get_value(const struct bshell_variable_p *var)
return &var->var_value;
}
static void variable_set_value(struct bshell_variable_p *var, fx_value *value)
static void variable_set_value(struct bshell_variable_p *var, fx_value value)
{
fx_value_unset(&var->var_value);
fx_value_copy(&var->var_value, value);
var->var_value = fx_value_copy_return(value);
}
bshell_variable *bshell_variable_create(const char *name)
@@ -70,7 +70,7 @@ const fx_value *bshell_variable_get_value(const bshell_variable *var)
var);
}
void bshell_variable_set_value(bshell_variable *var, fx_value *value)
void bshell_variable_set_value(bshell_variable *var, fx_value value)
{
FX_CLASS_DISPATCH_STATIC_V(
BSHELL_TYPE_VARIABLE,