summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-04 13:00:42 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-06 13:55:48 +0100
commit69b4b2fa50c7789ae16c2b417c8c291ed780770d (patch)
tree0fca757df362d2ea7c9c80b0fd59494a412e7f4e
parentb884a7a9c4b846f8e9f571f50cd9c5d9518e6ca2 (diff)
Do _copy_ the strings from the config object.
-rw-r--r--lib/conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/conf.c b/lib/conf.c
index adbda25..ff225ce 100644
--- a/lib/conf.c
+++ b/lib/conf.c
@@ -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++)