Fix a minor memory leak

2 jobs for master in 1 minute and 11 seconds
Status Job ID Name Coverage
  Build
passed #11755
build

00:00:27

 
  Distcheck
passed #11756
distcheck

00:00:44