summaryrefslogtreecommitdiffstats
path: root/demux/demux_tv.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-02 08:50:18 +0100
committerwm4 <wm4@nowhere>2017-02-02 08:50:18 +0100
commit738de7d3fe1b48c5ba71026bbceeaab3b37ca7ea (patch)
tree22927dc0dd5ea0db9b5b64ce5eed7b40b3ae0e48 /demux/demux_tv.c
parentf1c9032ddf5eba1241d9616656b4c36bc4043283 (diff)
downloadmpv-738de7d3fe1b48c5ba71026bbceeaab3b37ca7ea.tar.bz2
mpv-738de7d3fe1b48c5ba71026bbceeaab3b37ca7ea.tar.xz
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.)
Diffstat (limited to 'demux/demux_tv.c')
-rw-r--r--demux/demux_tv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_tv.c b/demux/demux_tv.c
index d80693e465..42b0ce5ff3 100644
--- a/demux/demux_tv.c
+++ b/demux/demux_tv.c
@@ -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) {