Show More
@@ -323,7 +323,7 b' static void _index_clearcaches(indexObje' | |||||
323 | } |
|
323 | } | |
324 | if (self->nt != NULL) { |
|
324 | if (self->nt != NULL) { | |
325 | free(self->nt->nodes); |
|
325 | free(self->nt->nodes); | |
326 |
|
|
326 | PyMem_Free(self->nt); | |
327 | } |
|
327 | } | |
328 | self->nt = NULL; |
|
328 | self->nt = NULL; | |
329 | Py_CLEAR(self->headrevs); |
|
329 | Py_CLEAR(self->headrevs); | |
@@ -1106,7 +1106,7 b' static int nt_init(indexObject *self)' | |||||
1106 |
|
1106 | |||
1107 | self->nt->nodes = calloc(self->nt->capacity, sizeof(nodetreenode)); |
|
1107 | self->nt->nodes = calloc(self->nt->capacity, sizeof(nodetreenode)); | |
1108 | if (self->nt->nodes == NULL) { |
|
1108 | if (self->nt->nodes == NULL) { | |
1109 |
|
|
1109 | PyMem_Free(self->nt); | |
1110 | self->nt = NULL; |
|
1110 | self->nt = NULL; | |
1111 | PyErr_NoMemory(); |
|
1111 | PyErr_NoMemory(); | |
1112 | return -1; |
|
1112 | return -1; | |
@@ -1119,7 +1119,7 b' static int nt_init(indexObject *self)' | |||||
1119 | self->nt->length = 1; |
|
1119 | self->nt->length = 1; | |
1120 | if (nt_insert(self, nullid, -1) == -1) { |
|
1120 | if (nt_insert(self, nullid, -1) == -1) { | |
1121 | free(self->nt->nodes); |
|
1121 | free(self->nt->nodes); | |
1122 |
|
|
1122 | PyMem_Free(self->nt); | |
1123 | self->nt = NULL; |
|
1123 | self->nt = NULL; | |
1124 | return -1; |
|
1124 | return -1; | |
1125 | } |
|
1125 | } |
General Comments 0
You need to be logged in to leave comments.
Login now