pdf: Fix small memory leak

4 jobs for !345 with work/aacid/small_memory_leak in 39 minutes (queued for 209 minutes and 11 seconds)
detached
Status Job ID Name Coverage
  Build
passed #82472
build_clazy_clang_tidy

00:20:27

passed #82471
build_ubuntu_20_04

00:06:32

passed #82473
clang_format

00:02:10

passed #82470
linux kf5-qt5 qt5.15

00:09:50

45.0%