[FFmpeg-devel] [PATCH 3/3] http: fix memory leak in parse_cookie.

rshaffer at tunein.com rshaffer at tunein.com
Fri Jan 12 00:28:52 EET 2018


From: Richard Shaffer <rshaffer at tunein.com>

This is my first time contributing. The problem and the solution seem pretty straightforward, but if I'm missing something, please do point me in the right direction.

Thanks,

-Richard

---
 libavformat/http.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index 4806b1e59b..510b23375a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -824,6 +824,7 @@ static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies)
             }
         }
     }
+    av_dict_free(&new_params);
 
     // duplicate the cookie name (dict will dupe the value)
     if (!(eql = strchr(p, '='))) return AVERROR(EINVAL);
-- 
2.14.3 (Apple Git-98)



More information about the ffmpeg-devel mailing list