diff options
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/ceval.c | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/Python/ceval.c b/Python/ceval.c index 8012b8357f..347a5411f9 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1250,6 +1250,7 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals,  				PyErr_SetString(PyExc_RuntimeError,  						"lost sys.displayhook");  				err = -1; +				x = NULL;  			}  			if (err == 0) {  				x = Py_BuildValue("(O)", v); @@ -1258,6 +1259,7 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals,  			}  			if (err == 0) {  				w = PyEval_CallObject(w, x); +				Py_XDECREF(w);  				if (w == NULL)  					err = -1;  			} | 
