After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784639 - convertframe: Fix leak in case of vcrop is disalbed
convertframe: Fix leak in case of vcrop is disalbed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Mac OS
: Normal normal
: 1.12.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-07 00:33 UTC by Heekyoung Seo
Modified: 2017-07-10 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
convertframe: Fix leak in case of vcrop is disabled (850 bytes, patch)
2017-07-07 00:33 UTC, Heekyoung Seo
committed Details | Review

Description Heekyoung Seo 2017-07-07 00:33:49 UTC
Created attachment 355057 [details] [review]
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;
    }
  }
Comment 1 Sebastian Dröge (slomo) 2017-07-07 06:27:16 UTC
Attachment 355057 [details] pushed as 6540677 - convertframe: Fix leak in case of vcrop is disabled