[Bug 784639] New: convertframe: Fix leak in case of vcrop is disalbed

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jul 7 00:33:49 UTC 2017


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

            Bug ID: 784639
           Summary: convertframe: Fix leak in case of vcrop is disalbed
    Classification: Platform
           Product: GStreamer
           Version: unspecified
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: heekyoung.seo at lge.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 355057
  --> https://bugzilla.gnome.org/attachment.cgi?id=355057&action=edit
convertframe: Fix leak in case of vcrop is disabled

In case of creating vcrop is failed, error is never freed in
build_convert_frame_pipeline.

  if (cmeta) {
    if (!create_element ("videocrop", &vcrop, &error)) {
       g_warning
          ("build_convert_frame_pipeline: Buffer has crop metadata but
videocrop element is not found. Cropping will be disabled");
    } else {
      if (!create_element ("videoconvert", &csp2, &error))
        goto no_elements;
    }
  }

--> If error is needed to be ignored, it has to be freed.

  if (cmeta) {
    if (!create_element ("videocrop", &vcrop, &error)) {
      g_error_free (error);
      g_warning
          ("build_convert_frame_pipeline: Buffer has crop metadata but
videocrop element is not found. Cropping will be disabled");
    } else {
      if (!create_element ("videoconvert", &csp2, &error))
        goto no_elements;
    }
  }

-- 
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