summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatya Prakash Gupta <sp.gupta@samsung.com>2017-07-24 13:23:17 +0530
committerSebastian Dröge <sebastian@centricular.com>2017-07-25 11:35:31 +0300
commit1b836e7e1478d1954b291b097fe310b9c249b84c (patch)
tree7f95be223daf2f976894fd5f6abf62ad80b43fab
parent0e808a3d902ee9535300fa087af06de70d3d7502 (diff)
downloadgstreamer-plugins-base-1b836e7e1478d1954b291b097fe310b9c249b84c.tar.gz
ssaparse: Fix buffer leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=785331
-rw-r--r--gst/subparse/gstssaparse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
index 9b00e7978..c849c08b8 100644
--- a/gst/subparse/gstssaparse.c
+++ b/gst/subparse/gstssaparse.c
@@ -169,8 +169,10 @@ gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps)
gst_buffer_ref (priv);
- if (!gst_buffer_map (priv, &map, GST_MAP_READ))
+ if (!gst_buffer_map (priv, &map, GST_MAP_READ)) {
+ gst_buffer_unref (priv);
return FALSE;
+ }
GST_MEMDUMP_OBJECT (parse, "init section", map.data, map.size);