summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/readlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/readlink.c')
-rw-r--r--otherlibs/unix/readlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/otherlibs/unix/readlink.c b/otherlibs/unix/readlink.c
index d129aebfe..5706ba035 100644
--- a/otherlibs/unix/readlink.c
+++ b/otherlibs/unix/readlink.c
@@ -36,7 +36,7 @@ CAMLprim value unix_readlink(value path)
char buffer[PATH_MAX];
int len;
char * p;
- p = caml_stat_alloc_string(path);
+ p = caml_strdup(String_val(path));
caml_enter_blocking_section();
len = readlink(p, buffer, sizeof(buffer) - 1);
caml_leave_blocking_section();