summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-05-19 09:12:14 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-05-19 09:12:14 +0200
commitcbc37f389f2fde9cb6f73e94614b005e1d3c1818 (patch)
tree9e907034f4001bb8db3f4d85adbc9be88c576f01
parentc842df1c3dd8bb76d139b9808dc4ed00a53eb62e (diff)
downloadgstreamer-plugins-bad-cbc37f389f2fde9cb6f73e94614b005e1d3c1818.tar.gz
rsvgdec: Unref handle and output state on error paths
CID 1214604
-rw-r--r--ext/rsvg/gstrsvgdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/rsvg/gstrsvgdec.c b/ext/rsvg/gstrsvgdec.c
index 624c9e9f6..a17c93592 100644
--- a/ext/rsvg/gstrsvgdec.c
+++ b/ext/rsvg/gstrsvgdec.c
@@ -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 =