rtptheorapay: Don't leak config data when receiving a second CAPS event

This commit is contained in:
Sebastian Dröge 2013-12-04 21:57:04 +01:00
parent 0915d696c7
commit d105de6e0f

View file

@ -507,6 +507,8 @@ gst_rtp_theora_pay_finish_headers (GstRTPBasePayload * basepayload)
configuration = g_base64_encode (config, configlen);
/* store for later re-sending */
if (rtptheorapay->config_data)
g_free (rtptheorapay->config_data);
rtptheorapay->config_size = configlen - 4 - 3 - 2;
rtptheorapay->config_data = g_malloc (rtptheorapay->config_size);
rtptheorapay->config_extra_len = extralen;