From: Christian McDonald Date: Wed, 1 Feb 2023 20:17:59 +0000 (-0500) Subject: set modinfo to null last X-Git-Tag: release-1.18.0rc1~24^2~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf55e60636d3172a9280703f93faab62d8a997a;p=thirdparty%2Funbound.git set modinfo to null last --- diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index 74a5d6607..d4042995e 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -566,12 +566,12 @@ void pythonmod_deinit(struct module_env* env, int id) pe->fname = NULL; free(pe); - /* Module is deallocated in Python */ - env->modinfo[id] = NULL; - /* iterate over all possible callback types and clean up each in turn */ for (int cbtype = 0; cbtype < inplace_cb_types_total; cbtype++) inplace_cb_delete(env, cbtype, id); + + /* Module is deallocated in Python */ + env->modinfo[id] = NULL; } void pythonmod_inform_super(struct module_qstate* qstate, int id, struct module_qstate* super)