[mythtv] possible filter manager leak

Erik Hovland erik at hovland.org
Fri Mar 14 15:31:11 UTC 2008


On Sat, Mar 15, 2008 at 01:30:25AM +1100, Mark Spieth wrote:
> Im not sure what the intention is with filter management, but in 
> filtermanager
> the libs opened with LoadFilterLib's dlopen are not dlclosed at any time. 
> This happens via the constructor of the filter manager. This also dlopens 
> all filters every time. I found this because I was chasing a deadlock inside 
> dlopen on play start which ended up being mythphone's fault (no mythphone, 
> no deadlock :-).
> 
> when a filter is used, it is dlopened again, and when done dlclosed but only 
> those that are used. so this part is good.
> 
> I may be wrong, but I suspect this is a handle leak.

According to coverity prevent, you are correct. This is reported as a
file resource leak.

If I read the man page for dlcose correctly, the dl file handle is ref
counted. So it "should" be safe to call dlclose on the handle after a
symbol has been loaded.

I'll submit a ticket and a patch if you don't and we will see where it
goes.

E

-- 
Erik Hovland
mail: erik at hovland.org
web: http://hovland.org/
PGP/GPG public key available on request



More information about the mythtv-dev mailing list