summaryrefslogtreecommitdiff
path: root/cmd/crlutil/crlgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/crlutil/crlgen.c')
-rw-r--r--cmd/crlutil/crlgen.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/crlutil/crlgen.c b/cmd/crlutil/crlgen.c
index 4eb16f71f..1fad32490 100644
--- a/cmd/crlutil/crlgen.c
+++ b/cmd/crlutil/crlgen.c
@@ -545,7 +545,7 @@ crlgen_CreateReasonCode(PLArenaPool *arena, const char **dataArr,
{
SECItem *encodedItem;
void *dummy;
- void *mark;
+ void *mark = NULL;
int code = 0;
PORT_Assert(arena && dataArr);
@@ -583,7 +583,9 @@ crlgen_CreateReasonCode(PLArenaPool *arena, const char **dataArr,
return encodedItem;
loser:
- PORT_ArenaRelease (arena, mark);
+ if (mark) {
+ PORT_ArenaRelease (arena, mark);
+ }
return NULL;
}
@@ -595,7 +597,7 @@ crlgen_CreateInvalidityDate(PLArenaPool *arena, const char **dataArr,
{
SECItem *encodedItem;
int length = 0;
- void *mark;
+ void *mark = NULL;
PORT_Assert(arena && dataArr);
if (!arena || !dataArr) {
@@ -624,7 +626,9 @@ crlgen_CreateInvalidityDate(PLArenaPool *arena, const char **dataArr,
return encodedItem;
loser:
- PORT_ArenaRelease(arena, mark);
+ if (mark) {
+ PORT_ArenaRelease(arena, mark);
+ }
return NULL;
}
@@ -1079,7 +1083,6 @@ static SECStatus
crlgen_RmCert(CRLGENGeneratorData *crlGenData, char *certId)
{
PRUint64 i = 0;
- PLArenaPool *arena;
PORT_Assert(crlGenData && certId);
if (!crlGenData || !certId) {
@@ -1087,8 +1090,6 @@ crlgen_RmCert(CRLGENGeneratorData *crlGenData, char *certId)
return SECFailure;
}
- arena = crlGenData->signCrl->arena;
-
if (crlgen_SetNewRangeField(crlGenData, certId) == SECFailure &&
certId) {
return SECFailure;