summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2015-07-27 10:56:49 (GMT)
committerStefan Krah <skrah@bytereef.org>2015-07-27 10:56:49 (GMT)
commitc0cbed15543cb48df70fec9680d58ae3454eaf4f (patch)
treeff6dbaebe1726dd2f12c77588675ee7fc53e2b75 /Python/compile.c
parentf66f4208b79974b348b76b90c0117b26e4dbfd21 (diff)
downloadcpython-c0cbed15543cb48df70fec9680d58ae3454eaf4f.zip
cpython-c0cbed15543cb48df70fec9680d58ae3454eaf4f.tar.gz
cpython-c0cbed15543cb48df70fec9680d58ae3454eaf4f.tar.bz2
Fix refleak.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 027e3ab..cfeab0f 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1146,8 +1146,10 @@ compiler_add_o(struct compiler *c, PyObject *dict, PyObject *o)
v = PyDict_GetItem(dict, t);
if (!v) {
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ Py_DECREF(t);
return -1;
+ }
arg = PyDict_Size(dict);
v = PyLong_FromSsize_t(arg);
if (!v) {
tr> * Add "select all" by clicking on (0,0) cell.Guido van Rossum2002-11-021-19/+40 * Add ESC key binding -- undo current cell editing.Guido van Rossum2002-11-021-12/+19 * Major breakthrough in selection -- drag-select multiple cells nowGuido van Rossum2002-11-021-10/+87 * Spreadsheet demo that I used in the advanced talk at Linux Lunacy II.Guido van Rossum2002-10-281-0/+740 * Remove reference to deleted 'www' directory.Guido van Rossum2002-10-181-1/+0 * Kill another merge zombie.Tim Peters2001-07-171-23/+0 * Removing these scripts. redemo.py lives on in Tools/scripts/.Guido van Rossum2000-10-062-298/+0 * Removing junkGuido van Rossum2000-05-1118-3046/+0 * This demo imported some private code from Matt. Make it cripple along.Guido van Rossum1999-04-081-3/+10 * Adding Fredrik Lundh's demo of the option menu.Guido van Rossum1998-10-201-0/+27 * Fix multi-arg list.append() calls.Guido van Rossum1998-10-082-2/+2 * Added a 'Help' special menu to show how this is done.Barry Warsaw1998-10-061-0/+5 * Added the mainloop() call.Guido van Rossum1998-09-141-0/+1 * Show how to do switchable panels.Guido van Rossum1998-07-15