Closed Bug 1021167 Opened 10 years ago Closed 9 years ago

Leak of |poll_list| on failure in _MW_PollInternal

Categories

(NSPR :: NSPR, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
4.10.9

People

(Reporter: mccr8, Assigned: Sylvestre)

Details

(Keywords: coverity, memory-leak, Whiteboard: [CID 222143])

Attachments

(1 file)

poll_list = (PRPollDesc*)PR_CALLOC(new_size);
            ...
            if (_prmw_running != group->state)
            {
                PR_SetError(PR_INVALID_STATE_ERROR, 0);
                goto aborted;
            }

Nothing in aborted frees poll_list.
Attached patch bug-1021167.diffSplinter Review
Attachment #8598919 - Flags: review?(wtc)
Comment on attachment 8598919 [details] [diff] [review]
bug-1021167.diff

Review of attachment 8598919 [details] [diff] [review]:
-----------------------------------------------------------------

r=wtc.

I moved the PR_DELETE call before the PR_SetError call
and checked in the patch.

https://hg.mozilla.org/projects/nspr/rev/0d955d2bbbec
Attachment #8598919 - Flags: review?(wtc)
Attachment #8598919 - Flags: review+
Attachment #8598919 - Flags: checked-in+
Assignee: wtc → sledru
Status: NEW → RESOLVED
Closed: 9 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.10.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: