RESOLVED FIXED 74224
[GStreamer] webkitwebsrc: pad template is leaked
https://bugs.webkit.org/show_bug.cgi?id=74224
Summary [GStreamer] webkitwebsrc: pad template is leaked
Judy Liqiong Hao
Reported 2011-12-09 15:49:21 PST
There is a memory leak in function "webkit_web_src_init" of "WebKitWebSourceGStreamer.cpp" with setting pad-templates for ghostpads. gst_static_pad_template_get() is used to get a GstPadTemplate out of static pad template. This is then passed as a parameter to gst_ghost_pad_new_from_template, which does a ref, but does not take ownership. Attached is a patch that unrefs the pad template after it's used.
Attachments
proposed patch (1.36 KB, patch)
2011-12-09 16:14 PST, Judy Liqiong Hao
no flags
Patch (1.95 KB, patch)
2012-01-09 10:46 PST, Judy Liqiong Hao
no flags
Judy Liqiong Hao
Comment 1 2011-12-09 16:14:40 PST
Created attachment 118663 [details] proposed patch
Philippe Normand
Comment 2 2011-12-12 01:24:42 PST
Thanks for spotting this! The pad template is still leaked in the case where appsrc is not created though? Can you use GRefPtr for this GstPadTemplate pointer? You'd need to add support for it in GRefPtrGStreamer.
Philippe Normand
Comment 3 2011-12-14 08:41:12 PST
Comment on attachment 118663 [details] proposed patch r- as per above remarks, some of which I applied in the patch of bug 74495
Philippe Normand
Comment 4 2012-01-04 05:28:12 PST
Ping Judy?
Judy Liqiong Hao
Comment 5 2012-01-04 09:59:41 PST
(In reply to comment #4) > Ping Judy? Yes?
Philippe Normand
Comment 6 2012-01-05 00:30:51 PST
(In reply to comment #5) > (In reply to comment #4) > > Ping Judy? > > Yes? Do you mind updating this patch?
Judy Liqiong Hao
Comment 7 2012-01-05 17:19:14 PST
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Ping Judy? > > > > Yes? > Do you mind updating this patch? Will send out a new patch for review ...
Judy Liqiong Hao
Comment 8 2012-01-09 10:46:41 PST
WebKit Review Bot
Comment 9 2012-01-09 12:18:28 PST
Comment on attachment 121685 [details] Patch Clearing flags on attachment: 121685 Committed r104475: <http://trac.webkit.org/changeset/104475>
WebKit Review Bot
Comment 10 2012-01-09 12:18:32 PST
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.