summaryrefslogtreecommitdiff
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-17 07:02:18 +0000
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-17 07:02:18 +0000
commit2a31a6d71af5a23f580a377cb00247336bb45872 (patch)
tree1581d86fb899cb0dccc7e47c4233504f11af843f /Python/_warnings.c
parentd6678575ad3e444594b507c87a010b268b993b0c (diff)
downloadcpython-2a31a6d71af5a23f580a377cb00247336bb45872.tar.gz
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. ........ ................
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index da52e357c3..ef7f373bdd 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -320,6 +320,8 @@ warn_explicit(PyObject *category, PyObject *message,
}
if (rc == 1) {
text = PyObject_Str(message);
+ if (text == NULL)
+ goto cleanup;
category = (PyObject*)message->ob_type;
}
else {