Commit dd7e3072 authored by Gyan Doshi's avatar Gyan Doshi

avformat/tcp: correct strdup check

Fixes CID 1524608.
parent c2210365
...@@ -169,7 +169,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ...@@ -169,7 +169,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
if (av_find_info_tag(buf, sizeof(buf), "local_port", p)) { if (av_find_info_tag(buf, sizeof(buf), "local_port", p)) {
av_freep(&s->local_port); av_freep(&s->local_port);
s->local_port = av_strdup(buf); s->local_port = av_strdup(buf);
if (!s->local_addr) if (!s->local_port)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
if (av_find_info_tag(buf, sizeof(buf), "local_addr", p)) { if (av_find_info_tag(buf, sizeof(buf), "local_addr", p)) {
......
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