Leak of |poll_list| on failure in _MW_PollInternal

RESOLVED FIXED in 4.10.9

Status

NSPR
NSPR
P2
normal
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: mccr8, Assigned: sylvestre)

Tracking

({coverity, memory-leak})

other
4.10.9
coverity, memory-leak

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CID 222143])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8598919 [details] [diff] [review]
bug-1021167.diff
Attachment #8598919 - Flags: review?(wtc)

Comment 2

3 years ago
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+

Updated

3 years ago
Assignee: wtc → sledru
Status: NEW → RESOLVED
Last Resolved: 3 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.