fix a memory leak

Change-Id: I105f0ac40251122348ed86eaab5d99a023f5c09b
Reviewed-on: https://gerrit.libreoffice.org/10588
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>