diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2023-03-30 23:19:56 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2023-04-02 10:18:56 +0530 |
commit | dd7e30724b739af9642917b1d04ba56d12e5e13f (patch) | |
tree | 6364ade935143298bc100c113029c5205186330a | |
parent | c221036502751d7a6e1403a9868c60f1ff357963 (diff) | |
download | ffmpeg-dd7e30724b739af9642917b1d04ba56d12e5e13f.tar.gz |
avformat/tcp: correct strdup check
Fixes CID 1524608.
-rw-r--r-- | libavformat/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c index a889633457..db41394a84 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -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)) { av_freep(&s->local_port); s->local_port = av_strdup(buf); - if (!s->local_addr) + if (!s->local_port) return AVERROR(ENOMEM); } if (av_find_info_tag(buf, sizeof(buf), "local_addr", p)) { |