From 5367b266539dfab4f33c4a25da7d484c6647578c Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Sat, 14 Nov 2015 20:35:54 -0800 Subject: [PATCH] rtp/theorapay: remove unnecessary NULL checks before g_free() --- gst/rtp/gstrtptheorapay.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c index 802a335afd..c2b46404ca 100644 --- a/gst/rtp/gstrtptheorapay.c +++ b/gst/rtp/gstrtptheorapay.c @@ -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;