mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-27 10:10:09 -05:00
- Fix python dict reference and double free in config.
This commit is contained in:
parent
164f302011
commit
78b2f1cc20
3 changed files with 2 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
- Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
|
- Merge PR #5: Python module: define constant MODULE_RESTART_NEXT
|
||||||
- Merge PR #4: Python module: assign something useful to the
|
- Merge PR #4: Python module: assign something useful to the
|
||||||
per-query data store 'qdata'
|
per-query data store 'qdata'
|
||||||
|
- Fix python dict reference and double free in config.
|
||||||
|
|
||||||
17 June 2019: Wouter
|
17 June 2019: Wouter
|
||||||
- Master contains version 1.9.3 in development.
|
- Master contains version 1.9.3 in development.
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,7 @@ int pythonmod_init(struct module_env* env, int id)
|
||||||
pe->module = PyImport_AddModule("__main__");
|
pe->module = PyImport_AddModule("__main__");
|
||||||
pe->dict = PyModule_GetDict(pe->module);
|
pe->dict = PyModule_GetDict(pe->module);
|
||||||
pe->data = PyDict_New();
|
pe->data = PyDict_New();
|
||||||
|
Py_XINCREF(pe->data);
|
||||||
PyModule_AddObject(pe->module, "mod_env", pe->data);
|
PyModule_AddObject(pe->module, "mod_env", pe->data);
|
||||||
|
|
||||||
/* TODO: deallocation of pe->... if an error occurs */
|
/* TODO: deallocation of pe->... if an error occurs */
|
||||||
|
|
|
||||||
|
|
@ -1398,7 +1398,6 @@ config_delete(struct config_file* cfg)
|
||||||
free(cfg->version);
|
free(cfg->version);
|
||||||
free(cfg->module_conf);
|
free(cfg->module_conf);
|
||||||
free(cfg->outgoing_avail_ports);
|
free(cfg->outgoing_avail_ports);
|
||||||
free(cfg->python_script);
|
|
||||||
config_delstrlist(cfg->caps_whitelist);
|
config_delstrlist(cfg->caps_whitelist);
|
||||||
config_delstrlist(cfg->private_address);
|
config_delstrlist(cfg->private_address);
|
||||||
config_delstrlist(cfg->private_domain);
|
config_delstrlist(cfg->private_domain);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue