From 7edb35d951207383be47f91ec6b32f7ee9bbcfb4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 26 Apr 2012 10:08:59 +0200 Subject: [PATCH] Use rs_strdup(). --- lib/conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/conf.c b/lib/conf.c index ad1a5f8..90fa256 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -11,6 +11,7 @@ #include #include #include "peer.h" +#include "util.h" #include "debug.h" #if 0 @@ -132,9 +133,9 @@ rs_context_read_config(struct rs_context *ctx, const char *config_file) return rs_err_ctx_push_fl (ctx, RSE_CONFIG, __FILE__, __LINE__, "missing realm name"); /* We use a copy of the return value of cfg_title() since it's const. */ - r->name = strdup (s); + r->name = rs_strdup (ctx, s); if (r->name == NULL) - return rs_err_ctx_push_fl (ctx, RSE_NOMEM, __FILE__, __LINE__, NULL); + return RSE_NOMEM; typestr = cfg_getstr (cfg_realm, "type"); if (strcmp (typestr, "UDP") == 0) -- 2.1.4