diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-05 12:52:20 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-08-05 12:52:20 -0700 |
commit | b212a43bb2d4eed6780cc93394fa566a09018a68 (patch) | |
tree | 6666ac71eaa1edaf7e7c07cc521f5e2c293b7c00 /src | |
parent | b80c4aa12eb9e0c5042872a2717a65b2d5483791 (diff) |
til: use set_raw_value() in randomize_setup() overrides
Missed this in the last round of moving things to the
new raw_value() setter/getter api
This snippet of copy-n-pasta the few setup front-ends continue to
have should really be factored out into a libtil helper
Diffstat (limited to 'src')
-rw-r--r-- | src/til.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } } |