From c154fd05fd4072f4299f6e8bf28a444b259919bb Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 24 Sep 2014 15:27:43 -0700 Subject: [PATCH] Memory Leak, missing Py_DECREF --- encode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/encode.c b/encode.c index d7a074720..fef102176 100644 --- a/encode.c +++ b/encode.c @@ -579,6 +579,7 @@ static unsigned int* get_qtables_arrays(PyObject* qtables, int* qtablesLen) { for (j = 0; j < DCTSIZE2; j++) { qarrays[i * DCTSIZE2 + j] = PyInt_AS_LONG(PySequence_Fast_GET_ITEM(table_data, j)); } + Py_DECREF(table_data); } *qtablesLen = num_tables;