[gstreamer-bugs] [Bug 496731] New: xvimagesink leaks memory if initialization fails

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Nov 14 04:49:08 PST 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=496731

  GStreamer | gst-plugins-base | Ver: HEAD CVS
           Summary: xvimagesink leaks memory if initialization fails
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: ext-tommi.myohanen at nokia.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Valgrind tells following (line numbers might differ, since I am not running the
CVS version in my test environment):

==24003== 20 bytes in 1 blocks are definitely lost in loss record 1 of 24
==24003==    at 0x4021B52: calloc (vg_replace_malloc.c:279)
==24003==    by 0x4280E14: g_malloc0 (in
/targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==24003==    by 0x77701CE: gst_xvimagesink_calculate_pixel_aspect_ratio
(xvimagesink.c:1588)
==24003==    by 0x7770719: gst_xvimagesink_xcontext_get (xvimagesink.c:1645)
==24003==    by 0x77720CE: gst_xvimagesink_change_state (xvimagesink.c:2081)
==24003==    by 0x4058DDF: gst_element_change_state (gstelement.c:2362)
==24003==    by 0x4059475: gst_element_set_state_func (gstelement.c:2312)
==24003==    by 0x4057D24: gst_element_set_state (gstelement.c:2218)
==24003==    by 0x45FBBD8: (within
/targets/OSSO_1.1_X86/usr/lib/gstreamer-0.10/libgstautodetect.so)
==24003==    by 0x4058DDF: gst_element_change_state (gstelement.c:2362)
==24003==    by 0x4059475: gst_element_set_state_func (gstelement.c:2312)
==24003==    by 0x4057D24: gst_element_set_state (gstelement.c:2218)

This is because gst_xvimagesink_calculate_pixel_aspect_ratio() creates par
GValue that is not freed if initialization fails later on. Attached is a patch
that fixes this issue.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=496731.




More information about the Gstreamer-bugs mailing list