From: Reynaldo H. Verdejo Pinochet Date: Sun, 15 Nov 2015 04:33:54 +0000 (-0800) Subject: rtp/vorbispay: remove unnecessary NULL checks before g_free() X-Git-Tag: 1.10.4~760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d23dfdabfab8889bad6ea9b3dcf9ebd2ad2ce1e;p=platform%2Fupstream%2Fgst-plugins-good.git rtp/vorbispay: remove unnecessary NULL checks before g_free() --- diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 4350705..2557bb5 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -156,8 +156,7 @@ gst_rtp_vorbis_pay_cleanup (GstRtpVorbisPay * rtpvorbispay) gst_rtp_vorbis_pay_clear_packet (rtpvorbispay); g_list_free_full (rtpvorbispay->headers, (GDestroyNotify) gst_buffer_unref); rtpvorbispay->headers = NULL; - if (rtpvorbispay->config_data) - g_free (rtpvorbispay->config_data); + g_free (rtpvorbispay->config_data); rtpvorbispay->config_data = NULL; rtpvorbispay->last_config = GST_CLOCK_TIME_NONE; } @@ -508,8 +507,7 @@ gst_rtp_vorbis_pay_finish_headers (GstRTPBasePayload * basepayload) configuration = g_base64_encode (config, configlen); /* store for later re-sending */ - if (rtpvorbispay->config_data) - g_free (rtpvorbispay->config_data); + g_free (rtpvorbispay->config_data); rtpvorbispay->config_size = configlen - 4 - 3 - 2; rtpvorbispay->config_data = g_malloc (rtpvorbispay->config_size); rtpvorbispay->config_extra_len = extralen;