summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/xstrdup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xstrdup.c b/lib/xstrdup.c
index 1182c592a..58f18beb6 100644
--- a/lib/xstrdup.c
+++ b/lib/xstrdup.c
@@ -29,5 +29,5 @@
char *
xstrdup (const char *string)
{
- return strcpy (xmalloc (strlen (string) + 1), string);
+ return xclone (string, strlen (string) + 1);
}