summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-06-29 19:49:27 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-06-29 19:49:27 (GMT)
commit721724270d5623cda4867a871aa34788dbf09021 (patch)
tree36d5a6f2f2ba2d30e052cb21792e0f5de694cb51 /Modules/pyexpat.c
parent82e6b94b9523beae3590d0c43eac15bf82a62c35 (diff)
downloadcpython-721724270d5623cda4867a871aa34788dbf09021.zip
cpython-721724270d5623cda4867a871aa34788dbf09021.tar.gz
cpython-721724270d5623cda4867a871aa34788dbf09021.tar.bz2
Fix segfault in pyexpat.c caused by 84375
u can be NULL, use XDECREF
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 3039347..067b775 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1129,7 +1129,7 @@ PyUnknownEncodingHandler(void *encodingHandlerData,
u = PyUnicode_Decode((char*) template_buffer, 256, name, "replace");
if (u == NULL || PyUnicode_READY(u)) {
- Py_DECREF(u);
+ Py_XDECREF(u);
return XML_STATUS_ERROR;
}