From dfffd78aff7a26478bc0fbdee9d2b81cfbfa6cc3 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Mon, 17 Apr 2000 16:11:09 +0200 Subject: [PATCH] Keep the pointer to the current object instead of the next one while running pike destroy code. Rev: src/object.c:1.111 --- src/object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/object.c b/src/object.c index 06d3b6d8ba..0881b7dccd 100644 --- a/src/object.c +++ b/src/object.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: object.c,v 1.110 2000/04/15 07:45:52 hubbe Exp $"); +RCSID("$Id: object.c,v 1.111 2000/04/17 14:11:09 mast Exp $"); #include "object.h" #include "dynamic_buffer.h" #include "interpret.h" @@ -1237,9 +1237,8 @@ void gc_free_all_unreferenced_objects(void) Pike_in_gc=4; /* Allow thread switches, god help us */ - for(o=first_object;o;o=next) + for(o=first_object;o;o=o->next) { - next=o->next; if(gc_do_free(o)) { add_ref(o); -- GitLab