blob: eceaec9d913d4061fc7e7a7299b5541b2c5eb765 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/* Copyright 2012 NORDUnet A/S. All rights reserved.
See LICENSE for licensing information. */
#include <string.h>
#include <radsec/radsec.h>
#include <radsec/radsec-impl.h>
#include "util.h"
char *
rs_strdup (struct rs_context *ctx, const char *s)
{
char *buf = rs_calloc (ctx, 1, strlen (s) + 1);
if (buf != NULL)
return strcpy (buf, s);
rs_err_ctx_push (ctx, RSE_NOMEM, NULL);
return NULL;
}
|