From 075dac486fbe7222b21c1336fd6dcb02f792cef3 Mon Sep 17 00:00:00 2001 From: Satya Prakash Gupta Date: Mon, 24 Jul 2017 13:23:17 +0530 Subject: [PATCH] ssaparse: Fix buffer leak in error case https://bugzilla.gnome.org/show_bug.cgi?id=785331 --- gst/subparse/gstssaparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c index 9b00e7978a..c849c08b82 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);