Просмотр исходного кода

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 лет назад
Родитель
Сommit
d2872aec70
1 измененных файлов с 4 добавлено и 0 удалено
  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;
 }