]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
apply dictclear to dict of deleted modules
authorGuido van Rossum <guido@python.org>
Thu, 26 Jan 1995 00:39:00 +0000 (00:39 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Jan 1995 00:39:00 +0000 (00:39 +0000)
Objects/moduleobject.c

index 9d8e1820f332d8950164e856f5dc0850fc17ab81..7377a98235a7b870314a0627c99c6d342c87b64d 100644 (file)
@@ -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);
 }