PyAPI: fix memory leaks in dictionary assignment

Thanks to Kévin Dietrich for spotting driver leak,
checked other uses of PyDict_SetItem and found more.
This commit is contained in:
2016-07-14 17:28:28 +10:00
parent cca57bf04c
commit f5e020a7a6
7 changed files with 61 additions and 27 deletions

View File

@@ -748,6 +748,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...)
/* set the value so we can access it */
PyDict_SetItemString(py_dict, "values", values);
Py_DECREF(values);
py_result = PyRun_File(fp, filepath, Py_file_input, py_dict, py_dict);