From 27e916fd3546955a903bc263dd750cd1839e2fc6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 26 Jan 1995 00:39:00 +0000 Subject: apply dictclear to dict of deleted modules --- Objects/moduleobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 9d8e182..7377a98 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -92,8 +92,10 @@ static void module_dealloc(m) moduleobject *m; { - if (m->md_dict != NULL) + if (m->md_dict != NULL) { + mappingclear(m->md_dict); DECREF(m->md_dict); + } free((char *)m); } -- cgit v0.12