Closed Bug 487884 Opened 16 years ago Closed 16 years ago

object leak in libpkix library upon error

Categories

(NSS :: Libraries, defect)

3.12.3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.4

People

(Reporter: alvolkov.bgs, Assigned: alvolkov.bgs)

Details

(Whiteboard: PKIX)

Attachments

(2 files)

pkix_pl_ocspresponse.c function pkix_pl_OcspResponse_Create: ones new request is created, all fields on the structure should be set to a proper values(including addressed of existing http client session and request) so that ocspresponse destructor would handle the cleanup of the object. Current code tries to increment ref count first, before variable assignment that leaks session in case when ref count failed.
Attachment #372153 - Flags: review?(nelson)
Whiteboard: PKIX
Comment on attachment 372153 [details] [diff] [review] Patch v1 - inc ref counter of the request after all assignments are done. r=nelson It surely was inobvious how this patch solved the problem, but I'm convinced now.
Attachment #372153 - Flags: review?(nelson) → review+
Assignee: alexei.volkov.bugs → nobody
Component: Documentation → Libraries
Sorry I reset the assignee accidentally when changing the component to "libraries".
Assignee: nobody → alexei.volkov.bugs
I have a preference to fix it this way. Code becomes more readable.
Attachment #372245 - Flags: review?(nelson)
Unsetting target milestone in unresolved bugs whose targets have passed.
Target Milestone: 3.12.1 → ---
Comment on attachment 372245 [details] [diff] [review] Patch v2 - alternative way to fix the same problem r=nelson
Attachment #372245 - Flags: review?(nelson) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: