Fix a memory leak in the garbage collector.