Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
capmt: clean all pids when adapter is NULL
  • Loading branch information
perexg committed Nov 8, 2015
1 parent 2a9cea2 commit 81dc8c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/descrambler/capmt.c
Expand Up @@ -423,8 +423,15 @@ capmt_pid_flush_adapter(capmt_t *capmt, int adapter)
int pid, i;

tuner = capmt->capmt_adapters[adapter].ca_tuner;
if (tuner == NULL)
if (tuner == NULL) {
/* clean all pids (to be sure) */
for (i = 0; i < MAX_PIDS; i++) {
o = &ca->ca_pids[i];
o->pid = 0;
o->pid_refs = 0;
}
return;
}
ca = &capmt->capmt_adapters[adapter];
mmi = LIST_FIRST(&tuner->mi_mux_active);
mux = mmi ? mmi->mmi_mux : NULL;
Expand Down

0 comments on commit 81dc8c8

Please sign in to comment.