diff Modules/_ctypes/callproc.c @ 72592:8d29cdf28216

Check error when calling PyUnicode_AppendAndDel()
author Victor Stinner <victor.stinner@haypocalc.com>
date Sun, 02 Oct 2011 20:35:10 +0200
parents 8beaa9a37387
children 5e33219492bc
line wrap: on
line diff
--- a/Modules/_ctypes/callproc.c	Sun Oct 02 19:00:15 2011 +0200
+++ b/Modules/_ctypes/callproc.c	Sun Oct 02 20:35:10 2011 +0200
@@ -944,9 +944,9 @@
     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);