summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/chmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/chmod.c')
-rw-r--r--otherlibs/unix/chmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/otherlibs/unix/chmod.c b/otherlibs/unix/chmod.c
index a04215521..90dd6024f 100644
--- a/otherlibs/unix/chmod.c
+++ b/otherlibs/unix/chmod.c
@@ -23,7 +23,7 @@ CAMLprim value unix_chmod(value path, value perm)
CAMLparam2(path, perm);
char * p;
int ret;
- p = caml_stat_alloc_string(path);
+ p = caml_strdup(String_val(path));
caml_enter_blocking_section();
ret = chmod(p, Int_val(perm));
caml_leave_blocking_section();