summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-02 17:51:09 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-02 17:51:09 +0200
commit4c9914227ed9e675d65ad16e0bb899e8107a0ee5 (patch)
treed4c542f51b5155eb3f3627c628686cfc0d648a2f /security
parentde01f1e7fce43d5919e6adcd73dfa617a9087520 (diff)
parentaa6329b694a981dccd5b0fd124936c4b54fb94a4 (diff)
downloadUXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.gz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.lz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.xz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.zip
Merge branch 'ported-upstream'
Diffstat (limited to 'security')
-rw-r--r--security/nss/lib/pk11wrap/pk11merge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11merge.c b/security/nss/lib/pk11wrap/pk11merge.c
index b2101b819..c6125b6e6 100644
--- a/security/nss/lib/pk11wrap/pk11merge.c
+++ b/security/nss/lib/pk11wrap/pk11merge.c
@@ -74,7 +74,7 @@ pk11_copyAttributes(PLArenaPool *arena,
return SECFailure;
}
/* remove the unknown attributes. If we don't have enough attributes
- * PK11_CreateNewObject() will fail */
+ * PK11_CreateNewObject() will fail */
for (i = 0, j = 0; i < copyTemplateCount; i++) {
if (copyTemplate[i].ulValueLen != -1) {
newTemplate[j] = copyTemplate[i];
@@ -88,6 +88,7 @@ pk11_copyAttributes(PLArenaPool *arena,
}
if (crv != CKR_OK) {
PORT_SetError(PK11_MapError(crv));
+ PORT_Free(newTemplate);
return SECFailure;
}
if (targetID == CK_INVALID_HANDLE) {
@@ -100,7 +101,7 @@ pk11_copyAttributes(PLArenaPool *arena,
copyTemplate, copyTemplateCount);
}
if (newTemplate) {
- free(newTemplate);
+ PORT_Free(newTemplate);
}
return rv;
}