rtptheoradepay: fix double frees

Fix double-frees introduced to fix another coverity report.

CID 1223053
This commit is contained in:
Tim-Philipp Müller 2014-06-16 12:02:41 +01:00
parent bb51ec5842
commit 054f774455

View file

@ -570,20 +570,16 @@ gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
break;
}
g_free (to_free);
if (rtptheoradepay->needs_keyframe)
goto request_keyframe;
out:
no_output:
gst_rtp_buffer_unmap (&rtp);
g_free (to_free);
return NULL;
no_output:
{
gst_rtp_buffer_unmap (&rtp);
g_free (to_free);
return NULL;
}
/* ERORRS */
switch_failed:
{
@ -600,9 +596,7 @@ packet_short:
ignore_reserved:
{
GST_WARNING_OBJECT (rtptheoradepay, "reserved TDT ignored");
gst_rtp_buffer_unmap (&rtp);
g_free (to_free);
return NULL;
goto out;
}
length_short:
{
@ -623,9 +617,7 @@ request_config:
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new ("GstForceKeyUnit",
"all-headers", G_TYPE_BOOLEAN, TRUE, NULL)));
gst_rtp_buffer_unmap (&rtp);
g_free (to_free);
return NULL;
goto out;
}
request_keyframe:
{
@ -633,9 +625,7 @@ request_keyframe:
gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depayload),
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new_empty ("GstForceKeyUnit")));
gst_rtp_buffer_unmap (&rtp);
g_free (to_free);
return NULL;
goto out;
}
}