summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/rkt/rkt_scener.c6
-rw-r--r--src/setup.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/rkt/rkt_scener.c b/src/modules/rkt/rkt_scener.c
index c491531..87d9e18 100644
--- a/src/modules/rkt/rkt_scener.c
+++ b/src/modules/rkt/rkt_scener.c
@@ -1056,8 +1056,10 @@ int rkt_scener_update(rkt_context_t *ctxt)
return rkt_scener_err_close(scener, 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;
}
}
diff --git a/src/setup.c b/src/setup.c
index 715708a..de71262 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -69,8 +69,10 @@ int setup_interactively(til_settings_t *settings, int (*setup_func)(const til_se
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