mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
rsvgdec: Unref handle and output state on error paths
CID 1214604
This commit is contained in:
parent
c842df1c3d
commit
cbc37f389f
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
surface =
|
||||
|
|
Loading…
Reference in a new issue