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:
1 parent
f1c9032ddf
commit
738de7d3fe
1 file changed
+1
-1
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user