This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
memory leak in setenv()?
- To: <Cygwin at Sourceware dot Cygnus dot Com>
- Subject: memory leak in setenv()?
- From: "Andrej Borsenkow" <Andrej dot Borsenkow at mow dot siemens dot ru>
- Date: Tue, 25 Jul 2000 12:30:05 +0400
If existing value is longer than new, old value is simply overwritten.
But if old value is shorter, new memory chunk is allocated via malloc(),
but old one is never freed. Initially all environment strings are
allocated using strdup() in environ_init(), so who is responsible for
freeing unused memory in this case?
Do I miss something here?
-andrej
Have a nice DOS!
B >>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com