From 9b36dfc237d428db65e8839868067926f8c50502 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Tue, 22 Nov 2011 11:33:11 -0500 Subject: [PATCH] Fix reference leak --- overviewer_core/src/iterate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overviewer_core/src/iterate.c b/overviewer_core/src/iterate.c index 30625c0..c6d8652 100644 --- a/overviewer_core/src/iterate.c +++ b/overviewer_core/src/iterate.c @@ -62,10 +62,13 @@ PyObject *init_chunk_render(PyObject *self, PyObject *args) { if (!tmp) return PyErr_Format(PyExc_ImportError, "Failed to get textures.max_blockid"); max_blockid = PyInt_AsLong(tmp); + Py_DECREF(tmp); + tmp = PyObject_GetAttrString(textures, "max_data"); if (!tmp) return PyErr_Format(PyExc_ImportError, "Failed to get textures.max_blockid"); max_data = PyInt_AsLong(tmp); + Py_DECREF(tmp); /* assemble the property table */ known_blocks = PyObject_GetAttrString(textures, "known_blocks");