mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
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:
parent
f1c9032ddf
commit
738de7d3fe
@ -31,7 +31,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check)
|
|||||||
bstr channel, input;
|
bstr channel, input;
|
||||||
bstr_split_tok(urlparams, "/", &channel, &input);
|
bstr_split_tok(urlparams, "/", &channel, &input);
|
||||||
if (channel.len) {
|
if (channel.len) {
|
||||||
talloc_free(params->channels);
|
talloc_free(params->channel);
|
||||||
params->channel = bstrto0(NULL, channel);
|
params->channel = bstrto0(NULL, channel);
|
||||||
}
|
}
|
||||||
if (input.len) {
|
if (input.len) {
|
||||||
|
Loading…
Reference in New Issue
Block a user