diff --git a/libfreerdp/core/smartcardlogon.c b/libfreerdp/core/smartcardlogon.c index ca4a8f30d..082ad333f 100644 --- a/libfreerdp/core/smartcardlogon.c +++ b/libfreerdp/core/smartcardlogon.c @@ -426,6 +426,8 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp NCryptFreeBuffer(enumState); NCryptFreeObject((NCRYPT_HANDLE)provider); out: + if (!ret) + smartcardCerts_Free(certs); free(scope); return ret; }