Commit 054f7744 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

rtptheoradepay: fix double frees

Fix double-frees introduced to fix another coverity report.

CID 1223053
parent bb51ec58
......@@ -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;
}
}
......
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