fix more memory leaks (many thanks to valgrind)
This commit is contained in:
parent
5589c6da3a
commit
bbb6059de8
3 changed files with 11 additions and 10 deletions
18
channels.c
18
channels.c
|
@ -297,17 +297,15 @@ channels_load(void)
|
|||
TAILQ_INIT(&cl);
|
||||
config_read_file0(buf, &cl);
|
||||
|
||||
if((name = config_get_str_sub(&cl, "name", NULL)) == NULL)
|
||||
continue;
|
||||
|
||||
if((grp = config_get_str_sub(&cl, "channel-group", NULL)) == NULL)
|
||||
continue;
|
||||
|
||||
tcg = channel_group_find(grp, 1);
|
||||
ch = channel_find(name, 1, tcg);
|
||||
name = config_get_str_sub(&cl, "name", NULL);
|
||||
grp = config_get_str_sub(&cl, "channel-group", NULL);
|
||||
if(name != NULL && grp != NULL) {
|
||||
tcg = channel_group_find(grp, 1);
|
||||
ch = channel_find(name, 1, tcg);
|
||||
|
||||
ch->ch_teletext_rundown =
|
||||
atoi(config_get_str_sub(&cl, "teletext-rundown", "0"));
|
||||
ch->ch_teletext_rundown =
|
||||
atoi(config_get_str_sub(&cl, "teletext-rundown", "0"));
|
||||
}
|
||||
|
||||
config_free0(&cl);
|
||||
}
|
||||
|
|
|
@ -95,6 +95,8 @@ transport_stop(th_transport_t *t, int flush_subscriptions)
|
|||
if(st->st_ctx != NULL)
|
||||
avcodec_close(st->st_ctx);
|
||||
|
||||
av_free(st->st_ctx);
|
||||
|
||||
st->st_parser = NULL;
|
||||
st->st_ctx = NULL;
|
||||
|
||||
|
|
1
tsmux.c
1
tsmux.c
|
@ -714,6 +714,7 @@ ts_muxer_deinit(ts_muxer_t *ts, th_subscription_t *s)
|
|||
while((o = TAILQ_FIRST(&tms->tms_lookahead)) != NULL) {
|
||||
pkt_deref(o->trp_pkt);
|
||||
TAILQ_REMOVE(&tms->tms_lookahead, o, trp_link);
|
||||
free(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue