apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignaz Birnstingl <ign...@gmail.com>
Subject [PATCH] apr_pstrdup value returned by apr_env_get
Date Fri, 19 Aug 2011 12:15:48 GMT
apr_env_get should pstrdup the value it returns - as it does according
to its documentation.

Index: misc/unix/env.c
===================================================================
--- misc/unix/env.c	(revision 1159605)
+++ misc/unix/env.c	(working copy)
@@ -37,7 +37,7 @@
     char *val = getenv(envvar);
     if (!val)
         return APR_ENOENT;
-    *value = val;
+    *value = apr_pstrdup(pool, val);
     return APR_SUCCESS;

 #else

-- 
Ignaz

Mime
View raw message