diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2016-03-04 20:17:20 -0300 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-03-09 15:39:31 +0100 |
commit | 2b47bf8c741e7cb0fd5a9705bdf826a1f87af72b (patch) | |
tree | 6c4ad18093ffa7f6afcaf410b3714ddff1b3821e | |
parent | 1608eff3e58e27a607bc9e2b7154386eeabb1bc5 (diff) |
vaapidecoder_h264: plug leak of h264 parsing info
If something goes wrong while parsing, the info object is
being leaked
https://bugzilla.gnome.org/show_bug.cgi?id=763121
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 670e79bb..3df0df95 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -4440,7 +4440,7 @@ gst_vaapi_decoder_h264_parse (GstVaapiDecoder * base_decoder, buf, 0, buf_size, &pi->nalu); status = get_status (result); if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) - return status; + goto exit; switch (pi->nalu.type) { case GST_H264_NAL_SPS: @@ -4470,7 +4470,7 @@ gst_vaapi_decoder_h264_parse (GstVaapiDecoder * base_decoder, break; } if (status != GST_VAAPI_DECODER_STATUS_SUCCESS) - return status; + goto exit; flags = 0; if (at_au_end) { @@ -4545,6 +4545,10 @@ gst_vaapi_decoder_h264_parse (GstVaapiDecoder * base_decoder, pi->flags = flags; gst_vaapi_parser_info_h264_replace (&priv->prev_pi, pi); return GST_VAAPI_DECODER_STATUS_SUCCESS; + +exit: + gst_vaapi_parser_info_h264_unref (pi); + return status; } static GstVaapiDecoderStatus |