[vlc-devel] [PATCH] core: object: clear res from vlc_object_delete()

Rémi Denis-Courmont remi at remlab.net
Mon Jan 27 19:53:16 CET 2020


Le maanantaina 27. tammikuuta 2020, 17.08.47 EET Thomas Guillem a écrit :
> On Mon, Jan 27, 2020, at 15:00, Rémi Denis-Courmont wrote:
> > Hi,
> > 
> > I don't think that we require an object to be deleted after a single
> > module probe though (unlike the kernel), or do we?
> No we don't require it, and nothing prevent to load/unload different kind of
> module using one vlc_object.

In any case, you can't bind more than one module per object at a time if 
modules use object resources. But if you can bind multiple modules 
consecutively, then clearing resources at deletion is inadequate, as it could 
lead to temporary linear resource leak.

IIRC, the kernel explicitly forbids binding a driver and an object more than 
once, so then cleaning up resources at object deletion is a legitimate 
simplification. But it does not seem like it for VLC - or at least not so far.

-- 
Реми Дёни-Курмон
http://www.remlab.net/





More information about the vlc-devel mailing list