[Bug 787714] New: Fix Memory leak in error case

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 15 09:15:12 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787714

            Bug ID: 787714
           Summary: Fix Memory leak in error case
    Classification: Platform
           Product: GStreamer
           Version: 1.12.1
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-omx
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: p.srinivas at samsung.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Hi,

 It is observed that there is memory leak in omxmodule.

File Name : omx/gstomxh265enc.c

Function Name : gst_omx_h265_enc_get_caps


In gstomxh265enc.c at gst_omx_h265_enc_get_caps : 450

memory is allocated for caps ,But in case of fail it has not been unref.

code:
caps = gst_caps_new_simple ("video/x-h265",
      "stream-format", G_TYPE_STRING, "byte-stream",
      "alignment", G_TYPE_STRING, "au", NULL);

  GST_OMX_INIT_STRUCT (&param);
  param.nPortIndex = GST_OMX_VIDEO_ENC (self)->enc_out_port->index;

  err =
      gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
      OMX_IndexParamVideoProfileLevelCurrent, &param);
  if (err != OMX_ErrorNone && err != OMX_ErrorUnsupportedIndex)
    return NULL;



Sol :  gst_caps_unref (caps);

Please provide your feedback.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list