Browse Source

Closed reference leak of variable 'k' in function ste_new which wasn't decrefed in error cases

pull/2332/head
Christian Heimes 13 years ago
parent
commit
8c1bce00d2
  1. 3
      Python/symtable.c

3
Python/symtable.c

@ -22,7 +22,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
void *key, int lineno)
{
PySTEntryObject *ste = NULL;
PyObject *k;
PyObject *k = NULL;
k = PyLong_FromVoidPtr(key);
if (k == NULL)
@ -75,6 +75,7 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
return ste;
fail:
Py_XDECREF(k);
Py_XDECREF(ste);
return NULL;
}

Loading…
Cancel
Save