Hum, NSS needs to be shut down too

- some ~80 bytes are still leaked apparently from somewhere within nss/nspr
This commit is contained in:
Panu Matilainen 2007-12-19 18:53:14 +02:00
parent 19f943cc36
commit d4676384db
3 changed files with 21 additions and 0 deletions

View File

@ -1588,6 +1588,10 @@ void rpmFreeRpmrc(void)
current[ARCH] = _free(current[ARCH]);
defaultsInitialized = 0;
/* FIX: platpat/current may be NULL */
/* XXX doesn't really belong here but... */
rpmFreeCrypto();
return;
}

View File

@ -1337,3 +1337,15 @@ int rpmInitCrypto(void) {
return rc;
}
int rpmFreeCrypto(void)
{
int rc = 0;
if (_crypto_initialized) {
rc = (NSS_Shutdown() != SECSuccess);
_crypto_initialized = 0;
}
return rc;
}

View File

@ -1333,6 +1333,11 @@ unsigned int pgpCRC(const uint8_t *octets, size_t len)
*/
int rpmInitCrypto(void);
/** \ingroup rpmpgp
* Shutdown cryptography
*/
int rpmFreeCrypto(void);
/** \ingroup rpmpgp
* Duplicate a digest context.
* @param octx existing digest context