rtsp: free opts dictionary on failure of getnameinfo
[ffmpeg.git] / libavformat / rtsp.c
index 2c616e8..4beb275 100644 (file)
@@ -2279,6 +2279,7 @@ static int sdp_read_header(AVFormatContext *s)
             if (err) {
                 av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n", gai_strerror(err));
                 err = AVERROR(EIO);
+                av_dict_free(&opts);
                 goto fail;
             }
             ff_url_join(url, sizeof(url), "rtp", NULL,