summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/rcache/rc_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/krb5/rcache/rc_io.c')
-rw-r--r--src/lib/krb5/rcache/rc_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c
index 6692ae1459..0309ade5f2 100644
--- a/src/lib/krb5/rcache/rc_io.c
+++ b/src/lib/krb5/rcache/rc_io.c
@@ -233,9 +233,8 @@ krb5_rc_io_open_internal(krb5_context context, krb5_rc_iostuff *d, char *fn,
GETDIR;
if (full_pathname) {
- if (!(d->fn = malloc(strlen(full_pathname) + 1)))
+ if (!(d->fn = strdup(full_pathname)))
return KRB5_RC_IO_MALLOC;
- (void) strcpy(d->fn, full_pathname);
} else {
if (!(d->fn = malloc(strlen(fn) + dirlen + 1)))
return KRB5_RC_IO_MALLOC;