Closed
Bug 1117591
Opened 10 years ago
Closed 10 years ago
Mismatched alloc/dealloc in APNAudio.cpp
Categories
(Core Graveyard :: Plug-ins, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla37
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
(deleted),
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
cppcheck says:
> dom/plugins/base/android/ANPAudio.cpp:263: error: Mismatching allocation and deallocation: s
> dom/plugins/base/android/ANPAudio.cpp:271: error: Mismatching allocation and deallocation: s
This was introduced by bug 768000 which change the allocation of |s| from |malloc| to |new| but didn't change the corresponding deallocations from |free| to |delete|.
Assignee | ||
Comment 1•10 years ago
|
||
I'm confident about the two changes in anp_audio_newTrack().
I'm less confident about the change in anp_audio_start() because that function
doesn't appear to be called from our code and so I can't see what gets passed
in... but it makes sense that if we're using |new| to allocate |ANPAudioTrack|
objects in one place we should always use |delete| to deallocate them.
Attachment #8543700 -
Flags: review?(blassey.bugs)
Comment 2•10 years ago
|
||
Comment on attachment 8543700 [details] [diff] [review]
Fix mismatched alloc/dealloc in APNAudio.cpp
Review of attachment 8543700 [details] [diff] [review]:
-----------------------------------------------------------------
I believe the only way a plugin is supposed to construct an ANPAudioTrack is by calling anp_audio_newTrack(), so we're pretty safe here in anp_audio_start().
Attachment #8543700 -
Flags: review?(blassey.bugs) → review+
Comment 3•10 years ago
|
||
(In reply to Brad Lassey [:blassey] (use needinfo?) from comment #2)
> Comment on attachment 8543700 [details] [diff] [review]
> Fix mismatched alloc/dealloc in APNAudio.cpp
>
> Review of attachment 8543700 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I believe the only way a plugin is supposed to construct an ANPAudioTrack is
> by calling anp_audio_newTrack(), so we're pretty safe here in
> anp_audio_start().
Correct.
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•