[PATCH] crypto init: release *_slot resource after init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

Those are only used at init phase and we can free some memory for the system.

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
 exec/totemcrypto.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c
index 13828d1..dc6b863 100644
--- a/exec/totemcrypto.c
+++ b/exec/totemcrypto.c
@@ -207,6 +207,8 @@ static int init_nss_crypto(struct crypto_instance *instance)
 		return -1;
 	}
 
+	PK11_FreeSlot(crypt_slot);
+
 	return 0;
 }
 
@@ -424,6 +426,8 @@ static int init_nss_hash(struct crypto_instance *instance)
 		return -1;
 	}
 
+	PK11_FreeSlot(hash_slot);
+
 	return 0;
 }
 
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux