Opened 2 years ago

Closed 2 years ago

#13126 closed bug (fixed)

[Patch] kits/media/PluginManager.cpp: fix memory leak

Reported by: mt Owned by: Barrett
Priority: normal Milestone: Unscheduled
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

In PluginManager::CreateReader(), 'buffered_source' may leak at line 240 [1] if buffered_source->InitCheck() != B_OK. [1] http://cgit.haiku-os.org/haiku/tree/src/kits/media/PluginManager.cpp#n240

Attachments (2)

0038-PluginManager.cpp-fix-memory-leak.patch (888 bytes) - added by mt 2 years ago.
report-97294d.html (96.6 KB) - added by mt 2 years ago.
report by Clang Static Analyzer

Download all attachments as: .zip

Change History (6)

comment:1 Changed 2 years ago by mt

Has a Patch: set

Changed 2 years ago by mt

Attachment: report-97294d.html added

report by Clang Static Analyzer

comment:2 Changed 2 years ago by Barrett

Thanks for the patch!

InitCheck was originally included in the BAdapterIO API and was then dropped and it's actually doing nothing.

The real fix here is to remove completely the InitCheck() function from BMediaIOWrapper and the check in PluginManager.

comment:3 Changed 2 years ago by Barrett

Are you willing to submit an updated patch? Otherwise I'd have to close this ticket and do the work myself.

comment:4 Changed 2 years ago by Barrett

Resolution: fixed
Status: newclosed

Fixed in hrev51004.

Note: See TracTickets for help on using tickets.