Fix a memory leak caused by the previous commit

3 jobs for master in 4 minutes and 47 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
passed #854652
mingw-build

00:03:53

passed #854650
shared-build

00:04:47

passed #854651
static-build

00:03:43