From f017b749ea9f1586d2308504553d40bf4cc5439d Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 6 Feb 2018 11:46:26 +0100 Subject: Update NSS to 3.32.1-RTM --- security/nss/cmd/bltest/blapitest.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'security/nss/cmd/bltest') diff --git a/security/nss/cmd/bltest/blapitest.c b/security/nss/cmd/bltest/blapitest.c index ebe73e6be..a3a162da1 100644 --- a/security/nss/cmd/bltest/blapitest.c +++ b/security/nss/cmd/bltest/blapitest.c @@ -917,6 +917,7 @@ setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, SECItem *in; unsigned char *tok; unsigned int i, j; + PRBool needToFreeFile = PR_FALSE; if (file && (numBytes == 0 || file == PR_STDIN)) { /* grabbing data from a file */ @@ -924,6 +925,7 @@ setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, if (rv != SECSuccess) return SECFailure; in = &fileData; + needToFreeFile = PR_TRUE; } else if (str) { /* grabbing data from command line */ fileData.data = (unsigned char *)str; @@ -957,10 +959,7 @@ setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, --in->len; if (in->data[in->len - 1] == '\r') --in->len; - SECITEM_CopyItem(arena, &input->buf, in); - if (rv != SECSuccess) { - return SECFailure; - } + rv = SECITEM_CopyItem(arena, &input->buf, in); break; case bltestHexSpaceDelim: SECITEM_AllocItem(arena, &input->buf, in->len / 5); @@ -986,7 +985,7 @@ setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, break; } - if (file) + if (needToFreeFile) SECITEM_FreeItem(&fileData, PR_FALSE); return rv; } -- cgit v1.2.3