diff options
author | Jérémie Dimino <jeremie@dimino.org> | 2013-12-23 16:24:50 +0000 |
---|---|---|
committer | Jérémie Dimino <jeremie@dimino.org> | 2013-12-23 16:24:50 +0000 |
commit | 9fd3c41247589d58458fa269debde17b3a15e63e (patch) | |
tree | f2b13c73a9f847fd1b8f9c5d2f4ad2b25ce7bbc2 /otherlibs/unix/gethost.c | |
parent | 61a4334e2731d2a526a74e13db425297e633ef3f (diff) |
fix #6276: release the runtime in all stubs that might block
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix/gethost.c')
-rw-r--r-- | otherlibs/unix/gethost.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c index e155152f8..607b6c35f 100644 --- a/otherlibs/unix/gethost.c +++ b/otherlibs/unix/gethost.c @@ -127,8 +127,7 @@ CAMLprim value unix_gethostbyname(value name) char * hostname; #if HAS_GETHOSTBYNAME_R || GETHOSTBYNAME_IS_REENTRANT - hostname = caml_stat_alloc(string_length(name) + 1); - strcpy(hostname, String_val(name)); + hostname = caml_stat_alloc_string(name); #else hostname = String_val(name); #endif |