summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-26 00:39:00 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-26 00:39:00 (GMT)
commit27e916fd3546955a903bc263dd750cd1839e2fc6 (patch)
treea725a43e7353087937bf92d2229c000197c3fd72
parent49b11fed7009804a85740c237fe204bd4baab8b2 (diff)
downloadcpython-27e916fd3546955a903bc263dd750cd1839e2fc6.zip
cpython-27e916fd3546955a903bc263dd750cd1839e2fc6.tar.gz
cpython-27e916fd3546955a903bc263dd750cd1839e2fc6.tar.bz2
apply dictclear to dict of deleted modules
-rw-r--r--Objects/moduleobject.c4
1 files changed, 3 insertions, 1 deletions
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);
}