demux_tv: free the correct field instead of creating dangling pointer

This could potentially have caused fun crashes if the --tv-channels
option was used, and something more advanced than tv:// was used to open
it. (This code is still untested.)
This commit is contained in:
wm4 2017-02-02 08:50:18 +01:00
parent f1c9032ddf
commit 738de7d3fe
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
bstr channel, input;
bstr_split_tok(urlparams, "/", &channel, &input);
if (channel.len) {
talloc_free(params->channels);
talloc_free(params->channel);
params->channel = bstrto0(NULL, channel);
}
if (input.len) {