bug 987217 - free leaking encodedRequest in GenerateCRMFRequest r=cviecco

This commit is contained in:
David Keeler 2014-03-25 10:38:03 -07:00
Родитель 9be9b98310
Коммит dc2c4359dc
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1838,7 +1838,7 @@ nsCreateReqFromKeyPairs(nsKeyPairInfo *keyids, int32_t numRequests,
return retString; return retString;
loser: loser:
nsFreeCertReqMessages(certReqMsgs,numRequests); nsFreeCertReqMessages(certReqMsgs,numRequests);
return nullptr;; return nullptr;
} }
static nsISupports * static nsISupports *
@ -2024,6 +2024,7 @@ nsCrypto::GenerateCRMFRequest(JSContext* aContext,
} }
CRMFObject* newObject = new CRMFObject(); CRMFObject* newObject = new CRMFObject();
newObject->SetCRMFRequest(encodedRequest); newObject->SetCRMFRequest(encodedRequest);
PORT_Free(encodedRequest);
nsFreeKeyPairInfo(keyids, numRequests); nsFreeKeyPairInfo(keyids, numRequests);
// Post an event on the UI queue so that the JS gets called after // Post an event on the UI queue so that the JS gets called after