GNOME Bugzilla – Bug 784639
convertframe: Fix leak in case of vcrop is disalbed
Last modified: 2017-07-10 10:35:22 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; } }
Attachment 355057 [details] pushed as 6540677 - convertframe: Fix leak in case of vcrop is disabled