[Python-checkins] python/dist/src/Modules _hotshot.c, 1.34, 1.34.10.1

arigo at users.sourceforge.net arigo at users.sourceforge.net
Tue Aug 3 11:02:35 CEST 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11156

Modified Files:
      Tag: release23-maint
	_hotshot.c 
Log Message:
back-ported SF bug #808756: refleaks


Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.34
retrieving revision 1.34.10.1
diff -C2 -d -r1.34 -r1.34.10.1
*** _hotshot.c	17 Mar 2003 19:46:07 -0000	1.34
--- _hotshot.c	3 Aug 2004 09:02:32 -0000	1.34.10.1
***************
*** 352,358 ****
--- 352,360 ----
                  }
                  if (PyDict_SetItem(self->info, key, list)) {
+                     Py_DECREF(list);
                      err = ERR_EXCEPTION;
                      goto finally;
                  }
+                 Py_DECREF(list);
              }
              if (PyList_Append(list, value))
***************
*** 524,527 ****
--- 526,530 ----
          self->logfp = NULL;
      }
+     Py_XDECREF(self->info);
      PyObject_Del(self);
  }
***************
*** 800,808 ****
          if (name == NULL) {
              if (pack_define_func(self, fileno, fcode->co_firstlineno,
!                                  PyString_AS_STRING(fcode->co_name)) < 0)
                  return -1;
!             if (PyDict_SetItem(dict, obj, fcode->co_name))
                  return -1;
          }
      }
      return fileno;
--- 803,816 ----
          if (name == NULL) {
              if (pack_define_func(self, fileno, fcode->co_firstlineno,
!                                  PyString_AS_STRING(fcode->co_name)) < 0) {
!                 Py_DECREF(obj);
                  return -1;
!             }
!             if (PyDict_SetItem(dict, obj, fcode->co_name)) {
!                 Py_DECREF(obj);
                  return -1;
+             }
          }
+         Py_DECREF(obj);
      }
      return fileno;



More information about the Python-checkins mailing list