fix memory leak around function descriptions

Found by Lsan.

Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c
(cherry picked from commit 3d6521280929ecacc53b7c358d29d0b5d31b3462)
Reviewed-on: https://gerrit.libreoffice.org/10740
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>