##// END OF EJS Templates
revlog: if the module is initialized more than once, don't leak nullentry...
Augie Fackler -
r40124:129bfc7a default
parent child Browse files
Show More
@@ -2304,8 +2304,10 b' void revlog_module_init(PyObject *mod)'
2304 Py_INCREF(&nodetreeType);
2304 Py_INCREF(&nodetreeType);
2305 PyModule_AddObject(mod, "nodetree", (PyObject *)&nodetreeType);
2305 PyModule_AddObject(mod, "nodetree", (PyObject *)&nodetreeType);
2306
2306
2307 if (!nullentry) {
2307 nullentry = Py_BuildValue(PY23("iiiiiiis#", "iiiiiiiy#"), 0, 0, 0,
2308 nullentry = Py_BuildValue(PY23("iiiiiiis#", "iiiiiiiy#"), 0, 0, 0,
2308 -1, -1, -1, -1, nullid, 20);
2309 -1, -1, -1, -1, nullid, 20);
2310 }
2309 if (nullentry)
2311 if (nullentry)
2310 PyObject_GC_UnTrack(nullentry);
2312 PyObject_GC_UnTrack(nullentry);
2311 }
2313 }
General Comments 0
You need to be logged in to leave comments. Login now