]> granicus.if.org Git - python/commitdiff
Fix a leak of a reference on None.
authorMichael W. Hudson <mwh@python.net>
Wed, 4 Aug 2004 14:33:28 +0000 (14:33 +0000)
committerMichael W. Hudson <mwh@python.net>
Wed, 4 Aug 2004 14:33:28 +0000 (14:33 +0000)
Modules/_cursesmodule.c

index 51f4c388fe6e046bcbcf20d541164f23d7777054..7847d3934ffb2abf07724ae091218ec589275a3f 100644 (file)
@@ -2284,9 +2284,7 @@ PyCurses_TypeAhead(PyObject *self, PyObject *args)
 
   if (!PyArg_ParseTuple(args,"i;fd",&fd)) return NULL;
 
-  PyCursesCheckERR(typeahead( fd ), "typeahead");
-  Py_INCREF(Py_None);
-  return Py_None;
+  return PyCursesCheckERR(typeahead( fd ), "typeahead");
 }
 
 static PyObject *