mirror of
https://github.com/clearlinux/telemetrics-client.git
synced 2026-08-28 21:35:39 +00:00
Make sure to strdup() the ini file keys
This commit is contained in:
committed by
Patrick McCarty
parent
59c63d8c40
commit
b193344145
+1
-1
@@ -97,7 +97,7 @@ bool read_config_from_file(char *config_file, struct configuration *config)
|
||||
return false;
|
||||
} else {
|
||||
for (int i = CONF_STR_MIN + 1; i < CONF_STR_MAX; i++) {
|
||||
config->strValues[i] = nc_hashmap_get(nc_hashmap_get(keyfile, "settings"), config_key_str[i]);
|
||||
config->strValues[i] = strdup(nc_hashmap_get(nc_hashmap_get(keyfile, "settings"), config_key_str[i]));
|
||||
fprintf(stderr, "Looking for %s found %s \n", config_key_str[i], config->strValues[i]);
|
||||
if (config->strValues[i] == NULL) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user