[fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Leo Razoumov
Very recently fossil_getenv function was introduced as a wrapper around standard getenv to get Unicode right. In file.c: /* ** Return the value of an environment variable as UTF8. */ char *fossil_getenv(const char *zName){ char *zValue = getenv(zName); #ifdef _WIN32 if( zValue ) zValue =

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Lluís Batlle i Rossell
On Thu, Feb 16, 2012 at 06:37:49AM -0500, Leo Razoumov wrote: In Unix it returns pointer pointing into actual environment (should not be modified or deallocated). In Windows, on the other hand, fossil_mbcs_to_utf8 allocates memory via sqlite3_malloc. This memory is not and cannot not be freed

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Leo Razoumov
2012/2/16 Lluís Batlle i Rossell vi...@viric.name: On Thu, Feb 16, 2012 at 06:37:49AM -0500, Leo Razoumov wrote: In Unix it returns pointer pointing into actual environment (should not be modified or deallocated). In Windows, on the other hand, fossil_mbcs_to_utf8 allocates memory via

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Lluís Batlle i Rossell
On Thu, Feb 16, 2012 at 07:09:22AM -0500, Leo Razoumov wrote: 2012/2/16 Lluís Batlle i Rossell vi...@viric.name: On Thu, Feb 16, 2012 at 06:37:49AM -0500, Leo Razoumov wrote: In Unix it returns pointer pointing into actual environment (should not be modified or deallocated). In Windows, on

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Leo Razoumov
2012/2/16 Lluís Batlle i Rossell vi...@viric.name: On Thu, Feb 16, 2012 at 07:09:22AM -0500, Leo Razoumov wrote: 2012/2/16 Lluís Batlle i Rossell vi...@viric.name: On Thu, Feb 16, 2012 at 06:37:49AM -0500, Leo Razoumov wrote: In Unix it returns pointer pointing into actual environment

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Richard Hipp
On Thu, Feb 16, 2012 at 6:37 AM, Leo Razoumov slonik...@gmail.com wrote: Very recently fossil_getenv function was introduced as a wrapper around standard getenv to get Unicode right. In file.c: /* ** Return the value of an environment variable as UTF8. */ char *fossil_getenv(const char

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread altufaltu
: Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8 On Thu, Feb 16, 2012 at 6:37 AM, Leo Razoumov slonik...@gmail.com wrote: Very recently fossil_getenv function was introduced as a wrapper around standard getenv to get Unicode right. In file.c

Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8

2012-02-16 Thread Richard Hipp
using the ui and server commands. - Original Message - From: Richard Hipp Sent: 02/16/12 06:04 PM To: slonik...@gmail.com, Fossil SCM user's discussion Subject: Re: [fossil-users] memory leak using fossil_getenv and fossil_mbcs_to_utf8 On Thu, Feb 16, 2012 at 6:37 AM, Leo