Commit 4665c080 authored by Olivier Crête's avatar Olivier Crête 👻 Committed by Vincent Penquerc'h
Browse files

oggdemux: Set chain pointers to NULL

Otherwise, they will refer to freed memory

https://bugzilla.gnome.org/show_bug.cgi?id=753078
parent 0a3fe31f
...@@ -2777,6 +2777,7 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg) ...@@ -2777,6 +2777,7 @@ gst_ogg_demux_deactivate_current_chain (GstOggDemux * ogg)
if (!ogg->pullmode) { if (!ogg->pullmode) {
if (ogg->building_chain == chain) if (ogg->building_chain == chain)
ogg->building_chain = NULL; ogg->building_chain = NULL;
ogg->current_chain = NULL;
gst_ogg_chain_free (chain); gst_ogg_chain_free (chain);
} }
...@@ -4920,6 +4921,8 @@ gst_ogg_demux_clear_chains (GstOggDemux * ogg) ...@@ -4920,6 +4921,8 @@ gst_ogg_demux_clear_chains (GstOggDemux * ogg)
gst_ogg_chain_free (chain); gst_ogg_chain_free (chain);
} }
ogg->chains = g_array_set_size (ogg->chains, 0); ogg->chains = g_array_set_size (ogg->chains, 0);
ogg->current_chain = NULL;
ogg->building_chain = NULL;
GST_CHAIN_UNLOCK (ogg); GST_CHAIN_UNLOCK (ogg);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment