[vlc-devel] [PATCH] demux: plug leaks
Shaleen Jain
shaleen.jain95 at gmail.com
Tue Sep 5 09:42:57 CEST 2017
On Mon, 2017-07-31 at 18:11 +0300, Rémi Denis-Courmont wrote:
> Le maanantaina 31. heinäkuuta 2017, 18.28.40 EEST Shaleen Jain a
> écrit :
> > Regards,
> > Shaleen Jain
> >
> > On Mon, Jul 31, 2017 at 6:09 PM, Francois Cartegnie <fcvlcdev at free.
> > fr>
> >
> > wrote:
> > > Le 31/07/2017 à 14:08, Shaleen Jain a écrit :
> > > > + es_out_Del( p_demux->out, p_sys->p_sub );
> > > > + es_out_Del( p_demux->out, p_sys->p_audio );
> > > > + es_out_Del( p_demux->out, p_sys->p_video );
> > > >
> > > > free( p_sys );
> > >
> > > ES are automatically deleted at the end.
> >
> > End of what?
>
> End of stream.
>
> There is a temporal leak if you remove a slave demux before the end
> of stream.
> But that is more of a side effect of missing master/slave ES output,
> than a
> bug of its own (it won´t cause a memory leak in the end).
So this would be a temporal leak?
==7820==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x7f3e46ccb860 in __interceptor_malloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:62
#1 0x7f3e3ca50b02 in es_out_Add ../include/vlc_es_out.h:123
#2 0x7f3e3ca50b02 in Parse demux/mpeg/es.c:517
#3 0x7f3e3ca517df in OpenCommon demux/mpeg/es.c:267
#4 0x7f3e3ca51b43 in OpenAudio demux/mpeg/es.c:282
#5 0x7f3e467da86f in module_load modules/modules.c:183
#6 0x7f3e467db1e6 in vlc_module_load modules/modules.c:279
#7 0x7f3e468223aa in demux_NewAdvanced input/demux.c:264
#8 0x7f3e468227a6 in demux_New input/demux.c:148
#9 0x5628874ec663 in FuzzerTestOneInput
/home/shalzz/builds/vlc/test/fuzz/libvlc_demux_fuzzer.cpp:114
>
> > These are es_out_id_t created by es_out_Add which I believe have to
> > be
> > freed with es_out_Del.
> >
> > Most of the modules free it except the few ones above.
>
> I could be wrong but AFAIR a lot of modules don´t delete their ES's
> explicitly.
>
--
Regards,
Shaleen Jain
More information about the vlc-devel
mailing list