From 953ec4faf496fbf3a5a91df994365ee53b5ad11b Mon Sep 17 00:00:00 2001 From: wrowe Date: Tue, 17 Apr 2007 21:36:05 +0000 Subject: nl_langinfo() may be transient, pstrdup it. PR: 41659 Backport: r529774 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@529775 13f79535-47bb-0310-9956-ffa450edef68 --- misc/unix/charset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/unix/charset.c b/misc/unix/charset.c index a66724d72..a16310cd0 100644 --- a/misc/unix/charset.c +++ b/misc/unix/charset.c @@ -75,7 +75,7 @@ APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool) /* Ignore the bogus information and use apr_os_default_encoding() */ if (charset[0] != '^') #endif - return charset; + return apr_pstrdup(pool, charset); } #endif -- cgit v1.2.1