Closed Bug 337083 Opened 18 years ago Closed 18 years ago

Coverity 508, dead code in mozilla/security/nss/lib/softoken/dbmshim.c

Categories

(NSS :: Libraries, defect, P3)

3.11
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.2

People

(Reporter: jonsmirl, Assigned: nelson)

Details

(Keywords: coverity)

Attachments

(1 file)

it is not possible for addr to be not null on error exit

Index: security/nss/lib/softoken/dbmshim.c
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/softoken/dbmshim.c,v
retrieving revision 1.11
diff -u -r1.11 dbmshim.c
--- security/nss/lib/softoken/dbmshim.c 29 Mar 2005 18:21:18 -0000      1.11
+++ security/nss/lib/softoken/dbmshim.c 8 May 2006 04:12:31 -0000
@@ -406,14 +406,6 @@
 loser:
     /* preserve the error code */
     error = PR_GetError();
-    if (addr) {
-       if (mapfile) {
-           PORT_Assert(len != -1);
-           PR_MemUnmap(addr,len);
-       } else {
-           PORT_Free(addr);
-       }
-    }
     if (mapfile) {
        PR_CloseFileMap(mapfile);
     }
Severity: normal → trivial
Priority: -- → P3
Attachment #221262 - Flags: review?(wtchang)
Wan-Teh, does this change trigger a need for a new FIPS review of softoken?
Attachment #221262 - Flags: review?(wtchang) → review+
Checked in on trunk.
new revision: 1.12; previous revision: 1.11
Assignee: nobody → nelson
Checked in on NSS_3_11_BRANCH
new revision: 1.11.30.1; previous revision: 1.11
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: