diff Python/_warnings.c @ 55293:8511c7c0d3ef 3.1

Merged revisions 74046 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r74046 | hirokazu.yamamoto | 2009-07-17 15:55:42 +0900 | 13 lines Merged revisions 74040,74042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74040 | hirokazu.yamamoto | 2009-07-17 15:20:46 +0900 | 1 line Issue #6415: Fixed warnings.warn sagfault on bad formatted string. ........ r74042 | hirokazu.yamamoto | 2009-07-17 15:26:54 +0900 | 1 line NEWS about r74040. ........ ................
author Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
date Fri, 17 Jul 2009 07:02:18 +0000
parents 287df3a09f35
children f197407bdba2 79718ee03986
line wrap: on
line diff
--- a/Python/_warnings.c	Thu Jul 16 16:19:14 2009 +0000
+++ b/Python/_warnings.c	Fri Jul 17 07:02:18 2009 +0000
@@ -320,6 +320,8 @@
     }
     if (rc == 1) {
         text = PyObject_Str(message);
+        if (text == NULL)
+            goto cleanup;
         category = (PyObject*)message->ob_type;
     }
     else {