Kaynağa Gözat

crypto init: release *_slot resource after init

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

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
Fabio M. Di Nitto 14 yıl önce
ebeveyn
işleme
d2872aec70
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      exec/totemcrypto.c

+ 4 - 0
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;
 }