From ade9cc968da791cf95b70f0312cc1131e362a596 Mon Sep 17 00:00:00 2001 From: "alexei.volkov.bugs%sun.com" Date: Mon, 5 Mar 2007 21:01:25 +0000 Subject: [PATCH] 129218 - memory leaks in tstclnt. r=neil --- security/nss/cmd/strsclnt/strsclnt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/security/nss/cmd/strsclnt/strsclnt.c b/security/nss/cmd/strsclnt/strsclnt.c index dde5e55c0fc..d1b45b496d4 100644 --- a/security/nss/cmd/strsclnt/strsclnt.c +++ b/security/nss/cmd/strsclnt/strsclnt.c @@ -1476,8 +1476,16 @@ main(int argc, char **argv) if (Cert_And_Key.key) { SECKEY_DestroyPrivateKey(Cert_And_Key.key); } + PR_DestroyLock(Cert_And_Key.lock); + if (Cert_And_Key.password) { + PL_strfree(Cert_And_Key.password); + } + if (Cert_And_Key.nickname) { + PL_strfree(Cert_And_Key.nickname); + } + /* some final stats. */ if (ssl3stats->hsh_sid_cache_hits + ssl3stats->hsh_sid_cache_misses + ssl3stats->hsh_sid_cache_not_ok == 0) {