diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-04 13:00:42 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-04 13:00:42 +0100 |
commit | aef3e5eb630dfe5246770c01a7d7f34c9a9e52f6 (patch) | |
tree | a87d7d37d444cd73cf1a723e0ac8d12926531483 | |
parent | bd6bf75723b3aec5d447e64c0ac98adbda7819d8 (diff) |
Do _copy_ the strings from the config object.
-rw-r--r-- | lib/conf.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -98,10 +98,10 @@ rs_context_read_config(struct rs_context *ctx, const char *config_file) r->timeout = cfg_getint (cfg_config, "timeout"); r->retries = cfg_getint (cfg_config, "retries"); - r->cacertfile = cfg_getstr (cfg_config, "cacertfile"); - /*r->cacertpath = cfg_getstr (cfg_config, "cacertpath");*/ - r->certfile = cfg_getstr (cfg_config, "certfile"); - r->certkeyfile = cfg_getstr (cfg_config, "certkeyfile"); + r->cacertfile = strdup (cfg_getstr (cfg_config, "cacertfile")); + /*r->cacertpath = strdup (cfg_getstr (cfg_config, "cacertpath"));*/ + r->certfile = strdup (cfg_getstr (cfg_config, "certfile")); + r->certkeyfile = strdup (cfg_getstr (cfg_config, "certkeyfile")); /* Add peers, one per server stanza. */ for (j = 0; j < cfg_size (cfg_config, "server"); j++) |