From 6cefe9483fda567d9db2447bda2f09f63d1101af Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 21 Mar 2011 14:17:55 +0100 Subject: (rs_context_destroy): Use free() rather than rs_free() for realm->name. --- lib/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/conf.c') diff --git a/lib/conf.c b/lib/conf.c index a1ac5b7..06ae3aa 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -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); -- cgit v1.1