[Bug 754973] New: xvimagesink: fix error leak when context creation fails

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Sep 13 17:36:13 PDT 2015


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

            Bug ID: 754973
           Summary: xvimagesink: fix error leak when context creation
                    fails
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: vineeth.tm at samsung.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

When context creation fails, the error message is being passed to
gst_element_message_full which is transfer full, hence error->message will be
freed.
But the error variable itself is getting leaked.
Hence duplicating the error->message before passing it on and freeing error
variable on no_context.



The leak is as below
==10417== 12 bytes in 1 blocks are definitely lost in loss record 586 of 1,750
==10417==    at 0x402C17C: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==10417==    by 0x4212BE2: g_malloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10417==    by 0x4229281: g_slice_alloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10417==    by 0x41F8781: g_error_new_valist (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10417==    by 0x41F8AEC: g_set_error (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==10417==    by 0x416A69D: gst_xvcontext_new (xvcontext.c:783)
==10417==    by 0x416645D: gst_xv_image_sink_change_state (xvimagesink.c:1730)
==10417==    by 0x4088DF2: gst_element_change_state (gstelement.c:2604)
==10417==    by 0x40894FA: gst_element_set_state_func (gstelement.c:2560)
==10417==    by 0x4088B3E: gst_element_set_state (gstelement.c:2461)
==10417==    by 0x4065801: gst_bin_change_state_func (gstbin.c:2341)
==10417==    by 0x40ACBB2: gst_pipeline_change_state (gstpipeline.c:499)

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