[Bug 784982] New: gst-plugins-ugly: Possible Memory Leak in in gstcaps

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Jul 15 13:36:21 UTC 2017


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

            Bug ID: 784982
           Summary: gst-plugins-ugly: Possible Memory Leak in  in gstcaps
    Classification: Platform
           Product: GStreamer
           Version: 1.12.2
                OS: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: gst-plugins-ugly
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: sp.gupta at samsung.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Hello All,

There is possible memory leak in 

File  : gst-plugins-ugly/ext/mpg123/gstmpg123audiodec.c

In function "gst_mpg123_audio_dec_class_init" at line: 167
gstcaps is assigned as per below 
 "src_template_caps = gst_caps_from_string (s->str)"

 but src_template_caps is not unref ..

It must be unref as below documentation :
https://sourcecodebrowser.com/gstreamer0.10/0.10.18/gst_2gstcaps_8c.html#a90f2094f46fc946b6850dd606558f81f


Also It is valid for :
File : gst-plugins-ugly/ext/x264/gstx264enc.c

In function "gst_x264_enc_class_init" at line : 1137

"supported_sinkcaps" should be unref.

It must be unref as below documentation :
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html#gst-caps-new-simple
" Caller is responsible for unreffing the returned caps."


Solution: There should be  gst_caps_unref(src_template_caps); and also 
gst_caps_unref(supported_sinkcaps) after use of caps.

Please check and provide your feedback about it.

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