Index: dll/win32/lsasrv/lsarpc.c =================================================================== --- dll/win32/lsasrv/lsarpc.c (revision 71918) +++ dll/win32/lsasrv/lsarpc.c (working copy) @@ -2617,19 +2617,21 @@ { if (EncryptedData != NULL) *EncryptedData = EncCurrentValue; + } else { if (EncryptedData != NULL) *EncryptedData = NULL; - - if (EncCurrentValue != NULL) - midl_user_free(EncCurrentValue); - - if (SecretObject != NULL) - LsapCloseDbObject(SecretObject); } + /* Lets clean up */ + if (EncCurrentValue != NULL) + midl_user_free(EncCurrentValue); + + if (SecretObject != NULL) + LsapCloseDbObject(SecretObject); + return Status; }