summaryrefslogtreecommitdiffstats
path: root/Modules/threadmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-02 19:30:30 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-02 19:30:30 (GMT)
commit3bbc62e9c25d4c006cd21d6b1314ccf0ba211382 (patch)
tree0b1a6d87c3bd250a62235f9df6ed9fffddbbabae /Modules/threadmodule.c
parent437a0e60baa6eabc2c853bee7ce1543481db8ca7 (diff)
downloadcpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.zip
cpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.tar.gz
cpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.tar.bz2
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.
Diffstat (limited to 'Modules/threadmodule.c')
-rw-r--r--Modules/threadmodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index 301f060..3e742f3 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -205,7 +205,9 @@ t_bootstrap(args_raw)
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 @@ thread_exit_thread(self, args)
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 */
}