diff --git a/mercurial/manifest.c b/mercurial/manifest.c --- a/mercurial/manifest.c +++ b/mercurial/manifest.c @@ -243,7 +243,7 @@ static PyObject *lmiter_iternext(PyObjec consumed = pl + 41; flags = PyString_FromStringAndSize(l->start + consumed, l->len - consumed - 1); - if (!flags) { + if (!path || !hash || !flags) { goto bail; } ret = PyTuple_Pack(3, path, hash, flags);