Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
libpkg: rsa: stop leaking an RSA object
Kyle Evans committed 5 years ago
commit a43bbc3a49c28f483aeea6ee1ae800d021a81318
parent cceda37
1 file changed +0 -5
modified libpkg/rsa.c
@@ -53,11 +53,6 @@ _load_rsa_private_key(struct rsa_key *rsa)
	if ((fp = fopen(rsa->path, "re")) == NULL)
		return (EPKG_FATAL);

-
	if ((rsa->key = RSA_new()) == NULL) {
-
		fclose(fp);
-
		return (EPKG_FATAL);
-
	}
-

	rsa->key = PEM_read_RSAPrivateKey(fp, 0, rsa->pw_cb, rsa->path);
	if (rsa->key == NULL) {
		fclose(fp);