summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/symtable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 1ec51f7..00b3427 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -28,7 +28,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
void *key, int lineno, int col_offset)
{
PySTEntryObject *ste = NULL;
- PyObject *k;
+ PyObject *k = NULL;
k = PyLong_FromVoidPtr(key);
if (k == NULL)
@@ -83,6 +83,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
return ste;
fail:
+ Py_XDECREF(k);
Py_XDECREF(ste);
return NULL;
}