diff Modules/threadmodule.c @ 2055:cf31eab6ab5a legacy-trunk

Another bulky set of minor changes. Note addition of gethostbyaddr() and improved repr() for sockets, renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
author Guido van Rossum <guido@python.org>
date Mon, 02 Jan 1995 19:30:30 +0000
parents 1940892d2fe3
children 172ba04a5191
line wrap: on
line diff
--- a/Modules/threadmodule.c	Mon Jan 02 19:13:30 1995 +0000
+++ b/Modules/threadmodule.c	Mon Jan 02 19:30:30 1995 +0000
@@ -205,7 +205,9 @@
 		fprintf(stderr, "Unhandled exception in thread:\n");
 		print_error(); /* From pythonmain.c */
 	}
-	(void) save_thread();
+	else
+		DECREF(res);
+	(void) save_thread(); /* Should always be NULL */
 	exit_thread();
 }
 
@@ -236,9 +238,11 @@
 	object *self; /* Not used */
 	object *args;
 {
+	object *frame;
 	if (!getnoarg(args))
 		return NULL;
-	(void) save_thread();
+	frame = save_thread(); /* Should never be NULL */
+	DECREF(frame);
 	exit_thread();
 	for (;;) { } /* Should not be reached */
 }