runtime: fix memory leaks
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user