avformat/rtsp: Don't free uninitialized AVBPrint
Fixes Coverity ID 1462307.
Reviewed-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Ross Nicholson <phunkyfish@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 49f7644..0a64620 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2567,8 +2567,8 @@
fail_nobuf:
ret = AVERROR(ENOMEM);
av_log(s, AV_LOG_ERROR, "rtp_read_header(): not enough buffer space for sdp-headers\n");
-fail:
av_bprint_finalize(&sdp, NULL);
+fail:
avcodec_parameters_free(&par);
if (in)
ffurl_close(in);