diff -r b7add2ebef9e -r 30e9ee203846 mercurial/manifest.c --- a/mercurial/manifest.c Wed Mar 11 08:28:56 2015 -0700 +++ b/mercurial/manifest.c Wed Mar 11 13:35:34 2015 -0700 @@ -243,7 +243,7 @@ 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);