[Python-checkins] python/dist/src/Modules pyexpat.c,2.84,2.85

mwh at users.sourceforge.net mwh at users.sourceforge.net
Tue Aug 3 13:31:34 CEST 2004


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

Modified Files:
	pyexpat.c 
Log Message:
Fix the reference count errors revealed by the test suite...


Index: pyexpat.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.84
retrieving revision 2.85
diff -C2 -d -r2.84 -r2.85
*** pyexpat.c	12 Oct 2003 19:09:37 -0000	2.84
--- pyexpat.c	3 Aug 2004 11:31:31 -0000	2.85
***************
*** 110,113 ****
--- 110,114 ----
          return 0;
      }
+     Py_DECREF(v);
      return 1;
  }
***************
*** 136,139 ****
--- 137,141 ----
          PyErr_SetObject(ErrorObject, err);
      }
+     Py_DECREF(err);
      return NULL;
  }
***************
*** 749,753 ****
              goto finally;
          }
!         args = Py_BuildValue("NN", string_intern(self, name), modelobj);
          if (args == NULL) {
              Py_DECREF(modelobj);
--- 751,755 ----
              goto finally;
          }
!         args = Py_BuildValue("NN", nameobj, modelobj);
          if (args == NULL) {
              Py_DECREF(modelobj);



More information about the Python-checkins mailing list