matroska/read-common: remove unnecessary NULL checks before g_free()
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 15 Nov 2015 05:26:21 +0000 (21:26 -0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Sun, 15 Nov 2015 09:43:08 +0000 (01:43 -0800)
gst/matroska/matroska-read-common.c

index 537fed9..691d462 100644 (file)
@@ -815,8 +815,7 @@ gst_matroska_read_common_parse_metadata_targets (GstMatroskaReadCommon * common,
 
       case GST_MATROSKA_ID_TARGETTYPE:
         if ((ret = gst_ebml_read_ascii (ebml, &id, &str)) == GST_FLOW_OK) {
-          if (*target_type != NULL)
-            g_free (*target_type);
+          g_free (*target_type);
           *target_type = str;
         }
         break;
@@ -1258,8 +1257,7 @@ gst_matroska_read_common_parse_header (GstMatroskaReadCommon * common,
         GST_DEBUG_OBJECT (common->sinkpad, "EbmlDocType: %s",
             GST_STR_NULL (text));
 
-        if (doctype)
-          g_free (doctype);
+        g_free (doctype);
         doctype = text;
         break;
       }