History

avformat/rtsp: fix leak of options dict on error

Fix CID 1655306

Marvin Scholz committed 1 year ago

Commit 82aeee31 parent 853ad9e1 file · +3 −0Browse files

Unified · Split

libavformat/rtsp.c+3−0
@@ -1847,6 +1847,7 @@ redirect: · 1846 unmodified lines
18471847 /* GET requests */
18481848 if (ffurl_alloc(&rt->rtsp_hd, httpname, AVIO_FLAG_READ,
18491849 &s->interrupt_callback) < 0) {
1850+ av_dict_free(&options);
18501851 err = AVERROR(EIO);
18511852 goto fail;
18521853 }
@@ -1863,6 +1864,7 @@ redirect: · 10 unmodified lines
18631864 if (!rt->rtsp_hd->protocol_whitelist && s->protocol_whitelist) {
18641865 rt->rtsp_hd->protocol_whitelist = av_strdup(s->protocol_whitelist);
18651866 if (!rt->rtsp_hd->protocol_whitelist) {
1867+ av_dict_free(&options);
18661868 err = AVERROR(ENOMEM);
18671869 goto fail;
18681870 }
@@ -1878,6 +1880,7 @@ redirect: · 9 unmodified lines
18781880 /* POST requests */
18791881 if (ffurl_alloc(&rt->rtsp_hd_out, httpname, AVIO_FLAG_WRITE,
18801882 &s->interrupt_callback) < 0 ) {
1883+ av_dict_free(&options);
18811884 err = AVERROR(EIO);
18821885 goto fail;
18831886 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t