summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-01-06 16:12:20 -0700
committerRob Crittenden <rcritten@redhat.com>2010-04-12 16:51:02 -0400
commitace20bb0f3932e6c404504085cd881c95128080e (patch)
tree4d2b39ba5c278825e8402e3b411179f2866b7ded
parenta2f68c345a45554aeabae0382f90444e00552300 (diff)
downloadpemnss-ace20bb0f3932e6c404504085cd881c95128080e.zip
pemnss-ace20bb0f3932e6c404504085cd881c95128080e.tar.gz
pemnss-ace20bb0f3932e6c404504085cd881c95128080e.tar.xz
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
-rw-r--r--prsa.c3
1 files changed, 3 insertions, 0 deletions
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);
}