epggrab: fix the missing variable initialization and NULL dereference
This commit is contained in:
parent
39feb44ec8
commit
d60fb2b571
2 changed files with 10 additions and 6 deletions
|
@ -622,12 +622,14 @@ _eit_callback
|
|||
goto done;
|
||||
|
||||
/* Register this */
|
||||
SKEL_ALLOC(svc_link_skel);
|
||||
svc_link_skel->uuid = (char*)idnode_uuid_as_str(&svc->s_id);
|
||||
osl = RB_INSERT_SORTED(&ota->om_svcs, svc_link_skel, link, osl_cmp);
|
||||
if (!osl) {
|
||||
svc_link_skel->uuid = strdup(svc_link_skel->uuid);
|
||||
SKEL_USED(svc_link_skel);
|
||||
if (ota) {
|
||||
SKEL_ALLOC(svc_link_skel);
|
||||
svc_link_skel->uuid = (char*)idnode_uuid_as_str(&svc->s_id);
|
||||
osl = RB_INSERT_SORTED(&ota->om_svcs, svc_link_skel, link, osl_cmp);
|
||||
if (!osl) {
|
||||
svc_link_skel->uuid = strdup(svc_link_skel->uuid);
|
||||
SKEL_USED(svc_link_skel);
|
||||
}
|
||||
}
|
||||
|
||||
/* No point processing */
|
||||
|
|
|
@ -210,6 +210,7 @@ epggrab_ota_register
|
|||
tvhinfo(mod->id, "registering mux %s", buf);
|
||||
ota = epggrab_ota_mux_skel;
|
||||
SKEL_USED(epggrab_ota_mux_skel);
|
||||
RB_INIT(&ota->om_svcs);
|
||||
ota->om_mux_uuid = strdup(uuid);
|
||||
ota->om_when = dispatch_clock + epggrab_ota_timeout(ota);
|
||||
ota->om_active = 1;
|
||||
|
@ -412,6 +413,7 @@ epggrab_ota_load_one
|
|||
}
|
||||
|
||||
ota = calloc(1, sizeof(epggrab_ota_mux_t));
|
||||
RB_INIT(&ota->om_svcs);
|
||||
ota->om_mux_uuid = strdup(uuid);
|
||||
ota->om_timeout = htsmsg_get_u32_or_default(c, "timeout", 0);
|
||||
ota->om_interval = htsmsg_get_u32_or_default(c, "interval", 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue