Fix mem leak

2 jobs for master in 40 minutes (queued for 21 minutes and 6 seconds)
Status Job ID Name Coverage
  Build
passed #54671
build_clazy_clang_tidy

00:37:00

passed #54670
linux kf5-qt5 qt5.12

00:40:00

35.0%