After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552000 - Unlikely but possible memleak in gst_pad_push
Unlikely but possible memleak in gst_pad_push
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal minor
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-12 17:12 UTC by Antoine Tremblay
Modified: 2008-09-12 18:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the possible leak (712 bytes, patch)
2008-09-12 17:13 UTC, Antoine Tremblay
rejected Details | Review
Patch to fix the leak for 0.10.20 (626 bytes, patch)
2008-09-12 17:26 UTC, Antoine Tremblay
none Details | Review

Description Antoine Tremblay 2008-09-12 17:12:16 UTC
Please describe the problem:
In gst_pad_push :

g_return_val_if_fail (GST_IS_PAD (pad), GST_FLOW_ERROR);
g_return_val_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SRC, GST_FLOW_ERROR);

these can return without unreffing the input buffer , thus causing a leak

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
See the patch below to fix
Comment 1 Antoine Tremblay 2008-09-12 17:13:23 UTC
Created attachment 118605 [details] [review]
Patch to fix the possible leak

Original patch by Yves Lefebvre
Comment 2 Tim-Philipp Müller 2008-09-12 17:24:19 UTC
These checks are just there to catch programming errors as early as possible, we don't care if things leak in this case.

(Also, the g_return_* statements are macros which can be turned into no-ops for production use on systems where binary size or the overhead caused by these runtime checks is an issue)
Comment 3 Antoine Tremblay 2008-09-12 17:26:04 UTC
Created attachment 118608 [details] [review]
Patch to fix the leak for 0.10.20 

last patch was a mistake please discard
Comment 4 Edward Hervey 2008-09-12 17:51:59 UTC
Antoine, this bug wont be fixed as tim pointed out.
Comment 5 Antoine Tremblay 2008-09-12 18:17:46 UTC
Edward: Relax I was upping the patch while Tim was commenting so Tim comment wasn't there when I sent the second patch...

I don't mind not fixing it..