Closed
Bug 1317660
Opened 8 years ago
Closed 8 years ago
Fix CID 1394336: Resource leaks in TestAudioPacketizer.cpp
Categories
(Core :: WebRTC: Audio/Video, defect, P3)
Core
WebRTC: Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: JamesCheng, Assigned: JamesCheng)
Details
Attachments
(1 file)
If the assertion_true not passed, it will not delete the buffer resource and cause a leak[1]. Just a simple fix. [1] http://searchfox.org/mozilla-central/rev/886d5186f0598ab2f8a9953eb5a4dab9750ef834/dom/media/gtest/TestAudioPacketizer.cpp#157
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8810797 -
Flags: review?(padenot)
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8810797 [details] Bug 1317660 - Fix CID 1394336: Resource leaks in TestAudioPacketizer.cpp https://reviewboard.mozilla.org/r/93136/#review93174 Can you implement my suggestion and land ? Thanks ! ::: dom/media/gtest/TestAudioPacketizer.cpp:154 (Diff revision 1) > } > phase++; > } > ap.Input(b.Get(), 128); > while (ap.PacketsAvailable()) { > int16_t* packet = ap.Output(); std::unique_ptr<int16_t>, this will call the destructor automatically when returning from the function in `ASSERT_TRUE`. ::: dom/media/gtest/TestAudioPacketizer.cpp:167 (Diff revision 1) > + } > + ASSERT_TRUE(result); > } > outPhase++; > } > delete [] packet; We can remove this with the unique_ptr.
Attachment #8810797 -
Flags: review?(padenot) → review+
Assignee | ||
Comment 3•8 years ago
|
||
Sure thank you.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8810797 [details] Bug 1317660 - Fix CID 1394336: Resource leaks in TestAudioPacketizer.cpp Hi padenot, Could you please review it again? I use unique_ptr to replace all raw pointer usage. Thanks.
Attachment #8810797 -
Flags: review+ → review?(padenot)
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8810797 [details] Bug 1317660 - Fix CID 1394336: Resource leaks in TestAudioPacketizer.cpp https://reviewboard.mozilla.org/r/93136/#review93466
Attachment #8810797 -
Flags: review?(padenot) → review+
Updated•8 years ago
|
Rank: 33
Priority: -- → P3
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/637eeed7d0d2 Fix CID 1394336: Resource leaks in TestAudioPacketizer.cpp r=padenot
Keywords: checkin-needed
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/637eeed7d0d2
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•