rtp/theorapay: remove unnecessary NULL checks before g_free()

This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-11-14 20:35:54 -08:00
parent 5d23dfdabf
commit 5367b26653

View file

@ -164,7 +164,6 @@ gst_rtp_theora_pay_cleanup (GstRtpTheoraPay * rtptheorapay)
gst_rtp_theora_pay_clear_packet (rtptheorapay); gst_rtp_theora_pay_clear_packet (rtptheorapay);
g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref); g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref);
rtptheorapay->headers = NULL; rtptheorapay->headers = NULL;
if (rtptheorapay->config_data)
g_free (rtptheorapay->config_data); g_free (rtptheorapay->config_data);
rtptheorapay->config_data = NULL; rtptheorapay->config_data = NULL;
rtptheorapay->last_config = GST_CLOCK_TIME_NONE; rtptheorapay->last_config = GST_CLOCK_TIME_NONE;
@ -516,7 +515,6 @@ gst_rtp_theora_pay_finish_headers (GstRTPBasePayload * basepayload)
configuration = g_base64_encode (config, configlen); configuration = g_base64_encode (config, configlen);
/* store for later re-sending */ /* store for later re-sending */
if (rtptheorapay->config_data)
g_free (rtptheorapay->config_data); g_free (rtptheorapay->config_data);
rtptheorapay->config_size = configlen - 4 - 3 - 2; rtptheorapay->config_size = configlen - 4 - 3 - 2;
rtptheorapay->config_data = g_malloc (rtptheorapay->config_size); rtptheorapay->config_data = g_malloc (rtptheorapay->config_size);