Fix a memory leak

2 jobs for master in 4 minutes and 34 seconds (queued for 43 seconds)