##// END OF EJS Templates
revlog: fix excessive decref on tuple creation failure in parse_index2()...
Yuya Nishihara -
r45733:2bc5d153 default
parent child Browse files
Show More
@@ -2885,7 +2885,7 b' PyTypeObject HgRevlogIndex_Type = {'
2885 */
2885 */
2886 PyObject *parse_index2(PyObject *self, PyObject *args)
2886 PyObject *parse_index2(PyObject *self, PyObject *args)
2887 {
2887 {
2888 PyObject *tuple = NULL, *cache = NULL;
2888 PyObject *cache = NULL;
2889 indexObject *idx;
2889 indexObject *idx;
2890 int ret;
2890 int ret;
2891
2891
@@ -2906,15 +2906,11 b' PyObject *parse_index2(PyObject *self, P'
2906 Py_INCREF(cache);
2906 Py_INCREF(cache);
2907 }
2907 }
2908
2908
2909 tuple = Py_BuildValue("NN", idx, cache);
2909 return Py_BuildValue("NN", idx, cache);
2910 if (!tuple)
2911 goto bail;
2912 return tuple;
2913
2910
2914 bail:
2911 bail:
2915 Py_XDECREF(idx);
2912 Py_XDECREF(idx);
2916 Py_XDECREF(cache);
2913 Py_XDECREF(cache);
2917 Py_XDECREF(tuple);
2918 return NULL;
2914 return NULL;
2919 }
2915 }
2920
2916
General Comments 0
You need to be logged in to leave comments. Login now