diff Python/_warnings.c @ 55289:130f1911d146 2.6

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 06:33:03 +0000
parents 642f20b22577
children e38335d4df91
line wrap: on
line diff
--- a/Python/_warnings.c	Thu Jul 16 15:39:24 2009 +0000
+++ b/Python/_warnings.c	Fri Jul 17 06:33:03 2009 +0000
@@ -304,6 +304,8 @@
     }
     if (rc == 1) {
         text = PyObject_Str(message);
+        if (text == NULL)
+            goto cleanup;
         category = (PyObject*)message->ob_type;
     }
     else {