Fix a memory leak

2 jobs for master in 3 minutes and 41 seconds (queued for 7 seconds)