From 790deb2d54b87278fe9c59ab2c94d3de330f8b6f Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Wed, 2 May 2018 13:12:25 -0700 Subject: [PATCH] fix memory leak in PyBullet.getJointStates, fixes issue #1661 --- examples/pybullet/pybullet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 31cdc20eb..6e9b42495 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -3551,6 +3551,7 @@ static PyObject* pybullet_getJointStates(PyObject* self, PyObject* args, PyObjec return NULL; } } + Py_DECREF(jointIndicesSeq); return resultListJointState; } }