-sbuf double initialization causes memory leak
-some missing variable destructions
t = RB_INSERT_SORTED(&api_hook_tree, api_skel, link, ah_cmp);
if (t) {
tvherror(LS_API, "trying to re-register subsystem");
+ free(api_skel);
} else {
SKEL_USED(api_skel);
}
free((void*)f->hmf_str);
}
l = f->hmf_msg = malloc(sizeof(htsmsg_t));
- if (l == NULL)
+ if (l == NULL) {
+ htsmsg_destroy(m);
return NULL;
+ }
f->hmf_type = m->hm_islist ? HMF_LIST : HMF_MAP;
f->hmf_flags |= HMF_ALLOCED;
l->hm_islist = m->hm_islist;
}
if (urlparse(url, &u))
- return;
+ goto end;
if (u.host == NULL || u.host[0] == '\0')
goto end;
im->im_data = hp;
sbuf_init(&hp->m3u_sbuf);
sbuf_init(&hp->key_sbuf);
- sbuf_init_fixed(&im->mm_iptv_buffer, IPTV_BUF_SIZE);
iptv_input_mux_started(hp->mi, im, 1);
http_client_register(hc); /* register to the HTTP thread */
r = http_client_simple(hc, u);