diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-26 10:08:59 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-26 10:08:59 +0200 |
commit | 7edb35d951207383be47f91ec6b32f7ee9bbcfb4 (patch) | |
tree | b3413b470873b0200abc6a358f38226ed1ffc671 /lib/conf.c | |
parent | a8609e55bd16b14a888535a7e2659b3217a9d1c7 (diff) |
Use rs_strdup().
Diffstat (limited to 'lib/conf.c')
-rw-r--r-- | lib/conf.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -11,6 +11,7 @@ #include <radsec/radsec.h> #include <radsec/radsec-impl.h> #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) |