- Fix python dict reference and double free in config.

This commit is contained in:
W.C.A. Wijngaards committed 2019-06-18 17:25:08 +02:00
1 parent 164f302011
commit 78b2f1cc20
3 files changed
+2 -1

No files matched your search

+1
View File
@@ -348,6 +348,7 @@ int pythonmod_init(struct module_env* env, int id)
pe->module = PyImport_AddModule("__main__");
pe->dict = PyModule_GetDict(pe->module);
pe->data = PyDict_New();
Py_XINCREF(pe->data);
PyModule_AddObject(pe->module, "mod_env", pe->data);
/* TODO: deallocation of pe->... if an error occurs */