Commit fba6ebaa authored by Sebastian Rasmussen's avatar Sebastian Rasmussen Committed by Edward Hervey

mpegts: No need to check for NULL before calling g_free()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732789
parent 66c38b50
...@@ -411,8 +411,7 @@ _gst_mpegts_atsc_string_segment_copy (GstMpegtsAtscStringSegment * seg) ...@@ -411,8 +411,7 @@ _gst_mpegts_atsc_string_segment_copy (GstMpegtsAtscStringSegment * seg)
static void static void
_gst_mpegts_atsc_string_segment_free (GstMpegtsAtscStringSegment * seg) _gst_mpegts_atsc_string_segment_free (GstMpegtsAtscStringSegment * seg)
{ {
if (seg->cached_string) g_free (seg->cached_string);
g_free (seg->cached_string);
g_slice_free (GstMpegtsAtscStringSegment, seg); g_slice_free (GstMpegtsAtscStringSegment, seg);
} }
......
...@@ -522,10 +522,8 @@ gst_mpegts_descriptor_from_dvb_service (GstMpegtsDVBServiceType service_type, ...@@ -522,10 +522,8 @@ gst_mpegts_descriptor_from_dvb_service (GstMpegtsDVBServiceType service_type,
memcpy (data, conv_service_name, service_size); memcpy (data, conv_service_name, service_size);
beach: beach:
if (conv_service_name) g_free (conv_service_name);
g_free (conv_service_name); g_free (conv_provider_name);
if (conv_provider_name)
g_free (conv_provider_name);
return descriptor; return descriptor;
} }
...@@ -1138,12 +1136,8 @@ _gst_mpegts_dvb_component_descriptor_copy (GstMpegtsComponentDescriptor * ...@@ -1138,12 +1136,8 @@ _gst_mpegts_dvb_component_descriptor_copy (GstMpegtsComponentDescriptor *
void void
gst_mpegts_dvb_component_descriptor_free (GstMpegtsComponentDescriptor * source) gst_mpegts_dvb_component_descriptor_free (GstMpegtsComponentDescriptor * source)
{ {
if (source->language_code) g_free (source->language_code);
g_free (source->language_code); g_free (source->text);
if (source->text)
g_free (source->text);
g_slice_free (GstMpegtsComponentDescriptor, source); g_slice_free (GstMpegtsComponentDescriptor, source);
} }
......
...@@ -338,8 +338,7 @@ out: ...@@ -338,8 +338,7 @@ out:
if (error) { if (error) {
GST_WARNING ("Could not convert from utf-8: %s", error->message); GST_WARNING ("Could not convert from utf-8: %s", error->message);
g_error_free (error); g_error_free (error);
if (out_text) g_free (out_text);
g_free (out_text);
return NULL; return NULL;
} }
...@@ -571,8 +570,7 @@ get_encoding_and_convert (const gchar * text, guint length) ...@@ -571,8 +570,7 @@ get_encoding_and_convert (const gchar * text, guint length)
giconv, is_multibyte, &error); giconv, is_multibyte, &error);
if (error != NULL) { if (error != NULL) {
GST_WARNING ("Could not convert string: %s", error->message); GST_WARNING ("Could not convert string: %s", error->message);
if (converted_str) g_free (converted_str);
g_free (converted_str);
g_error_free (error); g_error_free (error);
error = NULL; error = NULL;
......
...@@ -184,8 +184,7 @@ _gst_mpegts_section_free (GstMpegtsSection * section) ...@@ -184,8 +184,7 @@ _gst_mpegts_section_free (GstMpegtsSection * section)
if (section->cached_parsed && section->destroy_parsed) if (section->cached_parsed && section->destroy_parsed)
section->destroy_parsed (section->cached_parsed); section->destroy_parsed (section->cached_parsed);
if (section->data) g_free (section->data);
g_free (section->data);
g_slice_free (GstMpegtsSection, section); g_slice_free (GstMpegtsSection, section);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment