]> granicus.if.org Git - python/commitdiff
MERGE: Closes #15395: memory leaks in selectmodule.c
authorJesus Cea <jcea@jcea.es>
Thu, 19 Jul 2012 19:32:07 +0000 (21:32 +0200)
committerJesus Cea <jcea@jcea.es>
Thu, 19 Jul 2012 19:32:07 +0000 (21:32 +0200)
1  2 
Modules/selectmodule.c

index 8964b675fcb3634d231642baa6254b577bbf7b71,98b3108bf3ceb7c3c0eade9b5c79c8d7f29009aa..5b5eb92cc6880073219d12f691be93e16bd7c79f
@@@ -437,7 -420,8 +437,8 @@@ poll_modify(pollObject *self, PyObject 
          return NULL;
      if (PyDict_GetItem(self->dict, key) == NULL) {
          errno = ENOENT;
 -        PyErr_SetFromErrno(PyExc_IOError);
 +        PyErr_SetFromErrno(PyExc_OSError);
+         Py_DECREF(key);
          return NULL;
      }
      value = PyLong_FromLong(events);