From: Christian Heimes Date: Sat, 29 Jun 2013 19:49:27 +0000 (+0200) Subject: Fix segfault in pyexpat.c caused by 84375 X-Git-Tag: v3.4.0a1~358 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=721724270d5623cda4867a871aa34788dbf09021;p=python Fix segfault in pyexpat.c caused by 84375 u can be NULL, use XDECREF --- diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 303934709a..067b775924 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; }