strangely obvious leaky code

Change-Id: I968cbb784d53e0cff0649061c58f752939226a09
(cherry picked from commit 5b2f1b46b129c41890c54513c6d386407db6718a)
Reviewed-on: https://gerrit.libreoffice.org/9385
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>