[vlc-commits] demux: mock: fix leaks from config string
Francois Cartegnie
git at videolan.org
Thu Jul 2 21:48:44 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 2 21:25:08 2020 +0200| [02aa6f2cb8646af52f685af98bd5ee2de45f5ff3] | committer: Francois Cartegnie
demux: mock: fix leaks from config string
refs #24914
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=02aa6f2cb8646af52f685af98bd5ee2de45f5ff3
---
modules/demux/mock.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/mock.c b/modules/demux/mock.c
index 7ed4371121..76bcba4498 100644
--- a/modules/demux/mock.c
+++ b/modules/demux/mock.c
@@ -914,6 +914,8 @@ Close(vlc_object_t *obj)
demux_t *demux = (demux_t*)obj;
struct demux_sys *sys = demux->p_sys;
+ free( sys->config );
+
struct mock_track *track;
vlc_vector_foreach(track, &sys->tracks)
{
@@ -1028,7 +1030,10 @@ Open(vlc_object_t *obj)
char *name;
char *psz_next = config_ChainCreate(&name, &chain, psz_in);
if (name)
+ {
UpdateTrackConfiguration(demux, name, chain);
+ free(name);
+ }
config_ChainDestroy(chain);
if (sys->config != psz_in)
free(psz_in);
More information about the vlc-commits
mailing list