##// END OF EJS Templates
parsers: use Python memory allocator in commonancestorsheads()
Gregory Szorc -
r31469:a43fd9ec default
parent child Browse files
Show More
@@ -2166,7 +2166,7 b' static PyObject *index_commonancestorshe'
2166 int *revs;
2166 int *revs;
2167
2167
2168 argcount = PySequence_Length(args);
2168 argcount = PySequence_Length(args);
2169 revs = malloc(argcount * sizeof(*revs));
2169 revs = PyMem_Malloc(argcount * sizeof(*revs));
2170 if (argcount > 0 && revs == NULL)
2170 if (argcount > 0 && revs == NULL)
2171 return PyErr_NoMemory();
2171 return PyErr_NoMemory();
2172 len = index_length(self) - 1;
2172 len = index_length(self) - 1;
@@ -2237,11 +2237,11 b' static PyObject *index_commonancestorshe'
2237 goto bail;
2237 goto bail;
2238
2238
2239 done:
2239 done:
2240 free(revs);
2240 PyMem_Free(revs);
2241 return ret;
2241 return ret;
2242
2242
2243 bail:
2243 bail:
2244 free(revs);
2244 PyMem_Free(revs);
2245 Py_XDECREF(ret);
2245 Py_XDECREF(ret);
2246 return NULL;
2246 return NULL;
2247 }
2247 }
General Comments 0
You need to be logged in to leave comments. Login now