diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-21 14:17:55 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-21 14:17:55 +0100 |
commit | 6cefe9483fda567d9db2447bda2f09f63d1101af (patch) | |
tree | 973a8e6d361811f1e0ec6917971d4cc21780b7ab /lib/conf.c | |
parent | 217d24060890986d38848e0a9fd68ae6e7d1727f (diff) |
(rs_context_destroy): Use free() rather than rs_free() for realm->name.
Diffstat (limited to 'lib/conf.c')
-rw-r--r-- | lib/conf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -99,10 +99,12 @@ rs_context_read_config(struct rs_context *ctx, const char *config_file) else config->realms = r; cfg_realm = cfg_getnsec (cfg, "realm", i); + /* We use a copy of return value of cfg_title since it's a + const. */ s = cfg_title (cfg_realm); if (s == NULL) return rs_err_ctx_push_fl (ctx, RSE_CONFIG, __FILE__, __LINE__, - "missing config name"); + "missing realm name"); r->name = strdup (s); /* FIXME: Don't strdup. */ if (!r->name) return rs_err_ctx_push_fl (ctx, RSE_NOMEM, __FILE__, __LINE__, NULL); |