Closed Bug 495075 Opened 11 years ago Closed 11 years ago
Unk For Release incorrectly assigned in ns Data Obj::Get File Contents _IStream
According to <http://msdn.microsoft.com/en-us/library/ms693491(VS.85).aspx>, assigning the same pointer to both pstm and pUnkForRelease will cause Windows to AddRef() the pointer once (for pstm) but Release() it twice (for both pstm and pUnkForRelease). This leads to random crashes in debug mode when we drag/drop and stream the data. I've verified that the refcount goes to 0 with this patch, so there shouldn't be a memory leak. Another approach might be for us to AddRef() once.
Oops -- sorry for the minimal context. The line I'm changing is this one: <http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsDataObj.cpp#2004>
Attachment #379897 - Flags: superreview?(roc) → superreview+
Pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/b458d73bbe83
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.