diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c index 61ee4134392..8074bb111d3 100644 --- a/Modules/_heapqmodule.c +++ b/Modules/_heapqmodule.c @@ -230,13 +230,17 @@ nlargest(PyObject *self, PyObject *args) return NULL; heap = PyList_New(0); - if (it == NULL) + if (heap == NULL) goto fail; for (i=0 ; i