From: Jasmin Jessich Date: Sun, 26 Nov 2017 02:42:44 +0000 (+0100) Subject: dvbcam: Fix NULL pointer usage X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=036e84b29b2f1081ab3d4b73eab5e4425600771f;p=thirdparty%2Ftvheadend.git dvbcam: Fix NULL pointer usage When there is already a CAM assigned to the service, we jump to update_pid. In commit 7f81d726af1f92b268d031c08cf5d00f0f77a4c6 a tvhtrace call which prints the CAM name has been added. The name is accessed by "ac->ca->lca_name", which requires ac set to a proper value. This commit adds the ac setting before it jumps to "update_pid". Signed-off-by: Jasmin Jessich --- diff --git a/src/descrambler/dvbcam.c b/src/descrambler/dvbcam.c index d483369a8..cce0cebf8 100644 --- a/src/descrambler/dvbcam.c +++ b/src/descrambler/dvbcam.c @@ -410,8 +410,10 @@ dvbcam_service_start(caclient_t *cac, service_t *t) /* is there already a CAM associated to the service? */ TAILQ_FOREACH(as, &dvbcam_active_services, global_link) { - if (as->td_service == t) + if (as->td_service == t) { + ac = as->ac; goto update_pid; + } } /*