Commit 9c6777bd authored by Martin Storsjö's avatar Martin Storsjö

mmsh: Properly clean up if the second ffurl_alloc failed

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 02490bf3
...@@ -262,9 +262,9 @@ static int mmsh_open(URLContext *h, const char *uri, int flags) ...@@ -262,9 +262,9 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
// close the socket and then reopen it for sending the second play request. // close the socket and then reopen it for sending the second play request.
ffurl_close(mms->mms_hd); ffurl_close(mms->mms_hd);
memset(headers, 0, sizeof(headers)); memset(headers, 0, sizeof(headers));
if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ, if ((err = ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ,
&h->interrupt_callback) < 0) { &h->interrupt_callback)) < 0) {
return AVERROR(EIO); goto fail;
} }
stream_selection = av_mallocz(mms->stream_num * 19 + 1); stream_selection = av_mallocz(mms->stream_num * 19 + 1);
if (!stream_selection) if (!stream_selection)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment