From 2edbb8ace64a4303296fb5582a762070db3cbabd Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 1 Sep 2004 15:35:58 +0000 Subject: [PATCH] r9950: add note about malloc/free --- doc/ref_string.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/ref_string.xml b/doc/ref_string.xml index 7b0e93c..235950a 100644 --- a/doc/ref_string.xml +++ b/doc/ref_string.xml @@ -52,7 +52,9 @@ (result-code (c-gethostname name 256)) (hostname (when (zerop result-code) (uffi:convert-from-foreign-string name)))) - (uffi:free-foreign-object name) + ;; UFFI does not yet provide a universal way to free + ;; memory allocated by C's malloc. At this point, a program + ;; needs to call C's free function to free such memory. (unless (zerop result-code) (error "gethostname() failed.")))) -- 2.34.1