From patchwork Tue Aug 7 12:52:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D4152: index: use PyMem_Free() to free nodeetree instance From: phabricator X-Patchwork-Id: 33391 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Tue, 7 Aug 2018 12:52:20 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG05c1f5f49ebb: index: use PyMem_Free() to free nodeetree instance (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4152?vs=10033&id=10047 REVISION DETAIL https://phab.mercurial-scm.org/D4152 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -323,7 +323,7 @@ } if (self->nt != NULL) { free(self->nt->nodes); - free(self->nt); + PyMem_Free(self->nt); } self->nt = NULL; Py_CLEAR(self->headrevs); @@ -1106,7 +1106,7 @@ self->nt->nodes = calloc(self->nt->capacity, sizeof(nodetreenode)); if (self->nt->nodes == NULL) { - free(self->nt); + PyMem_Free(self->nt); self->nt = NULL; PyErr_NoMemory(); return -1; @@ -1119,7 +1119,7 @@ self->nt->length = 1; if (nt_insert(self, nullid, -1) == -1) { free(self->nt->nodes); - free(self->nt); + PyMem_Free(self->nt); self->nt = NULL; return -1; }