summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-02 18:35:10 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-02 18:35:10 (GMT)
commit67002af32309be6f3a484b4f47f1a1551a57ee6e (patch)
treedb8966ee3e9d08d28a2bad5648b2c59e99b36bb9 /Modules/_ctypes
parent1a15aba71d45a6ad38ee535611aa7eaf23de2e3e (diff)
downloadcpython-67002af32309be6f3a484b4f47f1a1551a57ee6e.zip
cpython-67002af32309be6f3a484b4f47f1a1551a57ee6e.tar.gz
cpython-67002af32309be6f3a484b4f47f1a1551a57ee6e.tar.bz2
Check error when calling PyUnicode_AppendAndDel()
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/callproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 5a5ce31..60d59c8 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -944,9 +944,9 @@ void _ctypes_extend_error(PyObject *exc_class, char *fmt, ...)
else {
PyErr_Clear();
PyUnicode_AppendAndDel(&s, PyUnicode_FromString("???"));
- if (s == NULL)
- goto error;
}
+ if (s == NULL)
+ goto error;
PyErr_SetObject(exc_class, s);
error:
Py_XDECREF(tp);