Commit cbc37f38 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

rsvgdec: Unref handle and output state on error paths

CID 1214604
parent c842df1c
......@@ -191,6 +191,7 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, GstBuffer * buffer,
if (ret != GST_FLOW_OK) {
g_object_unref (handle);
gst_video_codec_state_unref (output_state);
GST_ERROR_OBJECT (rsvg, "Buffer allocation failed %s",
gst_flow_get_name (ret));
return ret;
......@@ -205,6 +206,8 @@ gst_rsvg_decode_image (GstRsvgDec * rsvg, GstBuffer * buffer,
&gst_video_decoder_get_output_state (decoder)->info,
frame->output_buffer, GST_MAP_READWRITE)) {
GST_ERROR_OBJECT (rsvg, "Failed to get SVG image");
g_object_unref (handle);
gst_video_codec_state_unref (output_state);
surface =
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