From ace20bb0f3932e6c404504085cd881c95128080e Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 6 Jan 2010 16:12:20 -0700 Subject: fix memory leak in pem_mdCryptoOperationRSAPriv_Destroy pem_mdCryptoOperationRSAPriv_Destroy should destroy the low private key pem_mdCryptoOperationRSAPriv_Create allocates the lpk member of iOperation but it was not being freed anywhere --- prsa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prsa.c b/prsa.c index ad66f6c..5b2f379 100644 --- a/prsa.c +++ b/prsa.c @@ -328,7 +328,10 @@ pem_mdCryptoOperationRSAPriv_Destroy if (iOperation->buffer) { nssItem_Destroy(iOperation->buffer); + iOperation->buffer = NULL; } + pem_DestroyPrivateKey(iOperation->lpk); + iOperation->lpk = NULL; nss_ZFreeIf(iOperation); } -- cgit