Commit ab9ded06 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Restart search from the start when releasing permanent objects at exit.

parent 0a492021
...@@ -67,11 +67,21 @@ void dump_objects(void) ...@@ -67,11 +67,21 @@ void dump_objects(void)
void close_objects(void) void close_objects(void)
{ {
struct object *obj, *obj2;
/* release the permanent objects */ /* release the permanent objects */
LIST_FOR_EACH_ENTRY_SAFE( obj, obj2, &object_list, struct object, obj_list ) for (;;)
if (obj->is_permanent) release_object( obj ); {
struct object *obj;
int found = 0;
LIST_FOR_EACH_ENTRY( obj, &object_list, struct object, obj_list )
{
if (!(found = obj->is_permanent)) continue;
obj->is_permanent = 0;
release_object( obj );
break;
}
if (!found) break;
}
dump_objects(); /* dump any remaining objects */ dump_objects(); /* dump any remaining objects */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment