fix new[]/delete mismatch

Found by Asan. Upstreamed Libreoffice patch.