summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi/generic/util_localhost.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/gssapi/generic/util_localhost.c')
-rw-r--r--src/lib/gssapi/generic/util_localhost.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/gssapi/generic/util_localhost.c b/src/lib/gssapi/generic/util_localhost.c
index 2d3c27cb24..c014400fb8 100644
--- a/src/lib/gssapi/generic/util_localhost.c
+++ b/src/lib/gssapi/generic/util_localhost.c
@@ -45,8 +45,5 @@ g_local_host_name(void)
buf[sizeof(buf)-1] = '\0';
- if (! (ptr = xmalloc(strlen(buf) + 1)))
- return 0;
-
- return strcpy(ptr, buf);
+ return strdup(buf);
}