summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fed643)
raw | patch | inline | side by side (parent: 6fed643)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 18 Nov 2007 19:37:36 +0000 (20:37 +0100) | ||
committer | Florian Forster <octo@noris.net> | |
Tue, 20 Nov 2007 08:30:26 +0000 (08:30 +0000) |
Using the sfree() macro, the loop variable was accidentally set to NULL at the
end of the loop, causing the loop to terminate after the first iteration.
end of the loop, causing the loop to terminate after the first iteration.
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index d6371dbacffa4e06166e229fb06184d8e74130b8..5cec1ed8bfcf04d06af57452234b891aa1527bfb 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
t = perl_threads->tail;
while (NULL != t) {
+ c_ithread_t *last = NULL;
+
aTHX = t->interp;
PERL_SET_CONTEXT (aTHX);
+ log_debug ("Shutting down Perl interpreter %p...", aTHX);
+
#if COLLECT_DEBUG
sv_report_used ();
#endif /* COLLECT_DEBUG */
perl_destruct (aTHX);
perl_free (aTHX);
+ last = t;
t = t->prev;
- sfree (t);
+ sfree (last);
}
pthread_mutex_unlock (&perl_threads->mutex);