diff options
author | vinit jain <vinit.j@samsung.com> | 2015-05-20 15:53:40 -0700 |
---|---|---|
committer | vinit jain <vinit.j@samsung.com> | 2015-05-20 15:53:40 -0700 |
commit | 563a4e16d963ecde0eb0f2ff11e7407a9d8c0137 (patch) | |
tree | eef210fe74dac8517e012cdb6b81af746878d5e6 | |
parent | 78f1aad2babeb726b72e1f503c66fb1deb12ca3b (diff) | |
download | nss-hg-563a4e16d963ecde0eb0f2ff11e7407a9d8c0137.tar.gz |
Bug 1166163 - Fix a memory leak of the 'phone' argument in CertReq().
r=wtc.
-rw-r--r-- | cmd/certutil/certutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c index e1a299285..fa49846ce 100644 --- a/cmd/certutil/certutil.c +++ b/cmd/certutil/certutil.c @@ -180,7 +180,7 @@ AddCert(PK11SlotInfo *slot, CERTCertDBHandle *handle, char *name, char *trusts, static SECStatus CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType, - SECOidTag hashAlgTag, CERTName *subject, char *phone, int ascii, + SECOidTag hashAlgTag, CERTName *subject, const char *phone, int ascii, const char *emailAddrs, const char *dnsNames, certutilExtnList extnList, const char *extGeneric, /*out*/ SECItem *result) @@ -270,7 +270,7 @@ CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType, } if (!phone) - phone = strdup("(not specified)"); + phone = "(not specified)"; email = CERT_GetCertEmailAddress(subject); if (!email) |