# HG changeset patch # User Augie Fackler # Date 2015-12-31 18:45:48 # Node ID ca2d4080a02ea4d47c8894f0252af032f0a7de59 # Parent d6aa1a8c8d7c382c1304c968c7cb6a5a885ee218 lazymanifest: check error return in filter diff --git a/mercurial/manifest.c b/mercurial/manifest.c --- a/mercurial/manifest.c +++ b/mercurial/manifest.c @@ -694,6 +694,9 @@ static lazymanifest *lazymanifest_filter goto nomem; } copy = PyObject_New(lazymanifest, &lazymanifestType); + if (!copy) { + goto nomem; + } copy->dirty = true; copy->lines = malloc(self->maxlines * sizeof(line)); if (!copy->lines) {