소스 검색

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 년 전
부모
커밋
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;
 }