fix memory leak

Change-Id: I6683ab0d39dbbb5c0ba0958d72f0a1bbfab47164
Reviewed-on: https://gerrit.libreoffice.org/43955
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 0ca3c01..042421a 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -337,6 +337,8 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(

        // Erase KeyData array and leave.
        rtl_secureZeroMemory (pKeyData, sizeof(pKeyData));

        rtl_digest_destroy(hDigest);
    }

    return aResultKey;