summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/til.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/til.c b/src/til.c
index ea1e5fb..4fa42dd 100644
--- a/src/til.c
+++ b/src/til.c
@@ -539,8 +539,10 @@ int til_module_setup_randomize(const til_module_t *module, til_settings_t *setti
return -ENOMEM;
if (o != setting->value) {
- free((void *)setting->value);
- setting->value = o;
+ r = til_setting_set_raw_value(setting, o);
+ free((void *)o);
+ if (r < 0)
+ return -ENOMEM;
}
}
© All Rights Reserved