Author: walter.doerwald
Date: Fri Aug 10 12:11:43 2007
New Revision: 56894

Modified:
   python/branches/py3k/Objects/unicodeobject.c
Log:
Fix refleak: decref inputobj after extracting the relavant info (the object
won't go away, as the exception object holds another reference).


Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c        (original)
+++ python/branches/py3k/Objects/unicodeobject.c        Fri Aug 10 12:11:43 2007
@@ -1323,6 +1323,9 @@
     *input = PyBytes_AS_STRING(inputobj);
     insize = PyBytes_GET_SIZE(inputobj);
     *inend = *input + insize;
+    /* we can DECREF safely, as the exception has another reference,
+       so the object won't go away. */
+    Py_DECREF(inputobj);
 
     if (newpos<0)
        newpos = insize+newpos;
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to