Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc/stdlib

Module Name:    src
Committed By:   christos
Date:           Thu Sep 23 16:02:41 UTC 2010

Modified Files:
        src/lib/libc/stdlib: setenv.c

Log Message:
PR/43899: Nicolas Joly: setenv(3)/unsetenv(3) memory leak.
Partial fix: Don't allocate a new string if the length is equal to the
old length, because presumably the old string was also nul terminated
so it has the extra byte needed.
The real fix is to keep an adjunct array of bits, one for each environment
variable and keep track if the entry was allocated or not so that we can
free it in unsetenv.

To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/stdlib/setenv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index