Avoid the leak of nsPluginStreamListenerPeer obj when NS_OpenURI() failed

VERIFIED FIXED

Status

()

VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: srgchrpv, Assigned: srgchrpv)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

17 years ago
I suddenly run into this leak while tested bug 139563
the test case & patch are following
(Assignee)

Comment 1

17 years ago
Created attachment 81031 [details]
test case 

because file:///somefile.vaw cannot be found rv = NS_OpenURI() fails 
in nsPluginHostImpl::NewEmbededPluginStream()
(Assignee)

Comment 2

17 years ago
Created attachment 81035 [details] [diff] [review]
patch v1

if necko does not addRef on this listener, add & release here will delete the
object.
Av, could you r= on this, please?

Comment 3

17 years ago
Comment on attachment 81035 [details] [diff] [review]
patch v1

r=av, we have NS_ENSURE_ARGUMENT_POINTER macro, can make a use of it here.
Attachment #81035 - Flags: review+

Comment 4

17 years ago
this works now
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 5

17 years ago
.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.