Commit 65ed42a6 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/demux.c: Fix CID #110841

Fix dereference before NULL check.
parent 472ee998
...@@ -220,13 +220,13 @@ void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t ...@@ -220,13 +220,13 @@ void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t
void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec) void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
{ {
assert(p_demux); assert(p_demux);
assert(p_demux->p_first_subdec);
assert(p_subdec); assert(p_subdec);
if (!p_demux || !p_subdec) if (!p_demux || !p_subdec)
abort(); abort();
assert(p_demux->p_first_subdec);
dvbpsi_demux_subdec_t** pp_prev_subdec; dvbpsi_demux_subdec_t** pp_prev_subdec;
pp_prev_subdec = &p_demux->p_first_subdec; pp_prev_subdec = &p_demux->p_first_subdec;
while(*pp_prev_subdec != p_subdec) while(*pp_prev_subdec != p_subdec)
......
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