GNOME Bugzilla – Bug 498395
[pngenc] leaks buffer data memory
Last modified: 2007-12-06 08:46:35 UTC
Please describe the problem: Demo code provided creates an incredibly fast memory leak, of about 20 MB/s on my laptop. This memory leak is derived from my OLPC snapshot activity, which is currently unusable because it hits OOM mid-session, due to this leak. Steps to reproduce: Run example code. Actual results: Fast leak, followed by OOM. Expected results: nothing. Does this happen every time? Yes, both on OLPC and on Gentoo. Other information:
Created attachment 99373 [details] This attachment, when run as "python test.py" leaks memory. This code is derived from a simple snapshot activity. Just run it.
pngenc is leaking buffer data for some reason, looking into it.
Created attachment 99381 [details] [review] Pipeline test addition to uncover bad leak in pngenc This patch adds simple pipeline runs of pngenc, pngdec, jpegenc, jpegdec, smokeenc and smokedec to tests/check/pipelines/simple-launch-lines.c. This makes check-valgrind find the leak. Please re-assign this bug to gst-plugins-good, summary "[pngenc] leaks buffer data".
Created attachment 99382 [details] [review] Trivial fix for pngenc leaking all output buffer data
2007-11-20 Stefan Kost <ensonic@users.sf.net> Patch by: René Stadler <mail at renestadler dot de> * ext/libpng/gstpngenc.c: Don't leak buffer data memory. Fixes #498395. 2007-11-20 Stefan Kost <ensonic@users.sf.net> Patch by: René Stadler <mail at renestadler dot de> * tests/check/pipelines/simple-launch-lines.c: Tests for #498395.