rtp/theorapay: remove unnecessary NULL checks before g_free()
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 15 Nov 2015 04:35:54 +0000 (20:35 -0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 15 Nov 2015 09:43:08 +0000 (01:43 -0800)
gst/rtp/gstrtptheorapay.c

index 802a335..c2b4640 100644 (file)
@@ -164,8 +164,7 @@ gst_rtp_theora_pay_cleanup (GstRtpTheoraPay * rtptheorapay)
   gst_rtp_theora_pay_clear_packet (rtptheorapay);
   g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref);
   rtptheorapay->headers = NULL;
-  if (rtptheorapay->config_data)
-    g_free (rtptheorapay->config_data);
+  g_free (rtptheorapay->config_data);
   rtptheorapay->config_data = NULL;
   rtptheorapay->last_config = GST_CLOCK_TIME_NONE;
 }
@@ -516,8 +515,7 @@ 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);
+  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;