[Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.58,2.59 gdbmmodule.c,2.29,2.30
Martin v. L?wis
loewis@users.sourceforge.net
Sun, 11 Nov 2001 06:24:08 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Demo/tix/samples DirList.py,NONE,1.1 DirTree.py,NONE,1.1 SHList1.py,1.1,1.2 SHList2.py,1.1,1.2
- Next message: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.59,2.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv2592
Modified Files:
_cursesmodule.c gdbmmodule.c
Log Message:
Patch in bug report #477700: Fix memory leaks in gdbm & curses.
Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -d -r2.58 -r2.59
*** _cursesmodule.c 2001/10/24 17:10:49 2.58
--- _cursesmodule.c 2001/11/11 14:24:05 2.59
***************
*** 2545,2548 ****
--- 2545,2549 ----
c_api_object = PyCObject_FromVoidPtr((void *)PyCurses_API, NULL);
PyDict_SetItemString(d, "_C_API", c_api_object);
+ Py_DECREF(c_api_object);
/* For exception curses.error */
Index: gdbmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/gdbmmodule.c,v
retrieving revision 2.29
retrieving revision 2.30
diff -C2 -d -r2.29 -r2.30
*** gdbmmodule.c 2001/02/28 16:44:18 2.29
--- gdbmmodule.c 2001/11/11 14:24:05 2.30
***************
*** 506,510 ****
DL_EXPORT(void)
initgdbm(void) {
! PyObject *m, *d;
Dbmtype.ob_type = &PyType_Type;
--- 506,510 ----
DL_EXPORT(void)
initgdbm(void) {
! PyObject *m, *d, *s;
Dbmtype.ob_type = &PyType_Type;
***************
*** 516,521 ****
if (DbmError != NULL) {
PyDict_SetItemString(d, "error", DbmError);
! PyDict_SetItemString(d, "open_flags",
! PyString_FromString(dbmmodule_open_flags));
}
}
--- 516,522 ----
if (DbmError != NULL) {
PyDict_SetItemString(d, "error", DbmError);
! s = PyString_FromString(dbmmodule_open_flags);
! PyDict_SetItemString(d, "open_flags", s);
! Py_DECREF(s);
}
}
- Previous message: [Python-checkins] CVS: python/dist/src/Demo/tix/samples DirList.py,NONE,1.1 DirTree.py,NONE,1.1 SHList1.py,1.1,1.2 SHList2.py,1.1,1.2
- Next message: [Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.59,2.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]