Closed
Bug 1317660
Opened 9 years ago
Closed 9 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•9 years ago
|
Attachment #8810797 -
Flags: review?(padenot)
Comment 2•9 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•9 years ago
|
||
Sure thank you.
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 5•9 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•9 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•9 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•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 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
•