RESOLVED FIXED Bug 113762
[GStreamer] Memory leaks in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=113762
Summary [GStreamer] Memory leaks in MediaPlayerPrivateGStreamer
Sudarsana Nagineni (babu)
Reported 2013-04-02 02:18:26 PDT
strings returned by gst_element_get_name() and gst_missing_plugin_message_get_installer_detail() must be freed to avoid memory leaks. 1) ==21665== 99 bytes in 3 blocks are definitely lost in loss record 24,564 of 34,507 ==21665== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21665== by 0xD3E18D8: g_malloc (gmem.c:159) ==21665== by 0xD3F76FD: g_strdup (gstrfuncs.c:364) ==21665== by 0xB6693CC: gst_object_get_name (gstobject.c:657) ==21665== by 0x6F08280: WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties(_GObject*) (MediaPlayerPrivateGStreamer.cpp:151) ==21665== by 0x6F080B8: WebCore::setAudioStreamPropertiesCallback(_GstChildProxy*, _GObject*, char*, WebCore::MediaPlayerPrivateGStreamer*) (MediaPlayerPrivateGStreamer.cpp:125) ==21665== by 0x127ABF97: ffi_call_unix64 (in /home/sudarsana/Webkit/gtk/WebKit/WebKitBuild/Dependencies/Root/lib64/libffi.so.5.0.10) ==21665== by 0x127AB93C: ffi_call (ffi64.c:486) 2) ==21665== ==21665== 384 bytes in 2 blocks are definitely lost in loss record 30,965 of 34,507 ==21665== at 0x4C2B7B2: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21665== by 0xD3E1996: g_realloc (gmem.c:224) ==21665== by 0xD3F9A26: g_string_maybe_expand (gstring.c:107) ==21665== by 0xD3FAE66: g_string_append_vprintf (gstring.c:1168) ==21665== by 0xD3FB066: g_string_append_printf (gstring.c:1268) ==21665== by 0x414F0DF: gst_missing_plugin_message_get_installer_detail (missing-plugins.c:467) ==21665== by 0x6F0B8DF: WebCore::MediaPlayerPrivateGStreamer::handleMessage(_GstMessage*) (MediaPlayerPrivateGStreamer.cpp:780) ==21665== by 0x6F07FEC: WebCore::mediaPlayerPrivateMessageCallback(_GstBus*, _GstMessage*, WebCore::MediaPlayerPrivateGStreamer*) (MediaPlayerPrivateGStreamer.cpp:88)
Attachments
Patch (3.27 KB, patch)
2013-04-02 09:30 PDT, Sudarsana Nagineni (babu)
no flags
Sudarsana Nagineni (babu)
Comment 1 2013-04-02 09:30:09 PDT
Philippe Normand
Comment 2 2013-04-02 09:44:12 PDT
Comment on attachment 196162 [details] Patch Thanks!
Philippe Normand
Comment 3 2013-04-02 09:45:31 PDT
BTW I know these leaks are programming errors but perhaps it would be interesting to have a debug EWS bot running valgrind on patches pending-review. What do you think about that?
Sudarsana Nagineni (babu)
Comment 4 2013-04-02 12:49:42 PDT
(In reply to comment #3) > BTW I know these leaks are programming errors but perhaps it would be interesting to have a debug EWS bot running valgrind on patches pending-review. What do you think about that? This is exactly what I have been thinking. I'm going to spend some time trying to setup the leak bot.
WebKit Review Bot
Comment 5 2013-04-02 13:02:24 PDT
Comment on attachment 196162 [details] Patch Clearing flags on attachment: 196162 Committed r147490: <http://trac.webkit.org/changeset/147490>
WebKit Review Bot
Comment 6 2013-04-02 13:02:28 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.