Closed Bug 587404 Opened 15 years ago Closed 15 years ago

nssSlot_CreateSession should return early if !readWrite

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: rrelyea)

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

80 nssSlot_CreateSession 88 rvSession = nss_ZNEW(arenaOpt, nssSession); 92 if (readWrite) { 118 } else { leaks rvSession: 119 return NULL; 120 } 121 }
Summary: nssSlot_CreateSession shoudl return early if !readWrite → nssSlot_CreateSession should return early if !readWrite
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #466128 - Flags: review?(nelson)
Comment on attachment 466128 [details] [diff] [review] patch review requests for patches to pk11wrap & softoken should go to rrelyea
Attachment #466128 - Flags: review?(nelson) → review?(rrelyea)
Comment on attachment 466128 [details] [diff] [review] patch nssSlot_CreateSession appears to always be called with readWrite set to true. This code makes it clear that that is required (as well as not leaking rvSession, which is probably where timeless found the issue).
Attachment #466128 - Flags: review?(rrelyea) → review+
taking bug until I check it in.
Assignee: timeless → rrelyea
Checking in pk11wrap/dev3hack.c; /cvsroot/mozilla/security/nss/lib/pk11wrap/dev3hack.c,v <-- dev3hack.c new revision: 1.26; previous revision: 1.25 done
Status: ASSIGNED → RESOLVED
Closed: 15 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: