[Python-checkins] python/dist/src/Modules posixmodule.c,2.282,2.283
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Sun, 09 Feb 2003 19:10:45 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv29707/Modules
Modified Files:
posixmodule.c
Log Message:
Fix memory leak of newstr when putenv() fails
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.282
retrieving revision 2.283
diff -C2 -d -r2.282 -r2.283
*** posixmodule.c 10 Jan 2003 15:29:16 -0000 2.282
--- posixmodule.c 10 Feb 2003 03:10:43 -0000 2.283
***************
*** 5663,5666 ****
--- 5663,5667 ----
PyOS_snprintf(new, len, "%s=%s", s1, s2);
if (putenv(new)) {
+ Py_DECREF(newstr);
posix_error();
return NULL;