Let's not leak here.

Change-Id: I12a50d0028164c37d06ff846bfbeff56a4591d12
(cherry picked from commit 9cfa665706cbced0fa71c43bb9425f28a0145f67)
Reviewed-on: https://gerrit.libreoffice.org/8558
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>