Fix a memory leak

2 jobs for !1 with master in 2 minutes and 1 second (queued for 7 seconds)
merge request