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 515697 - [multifile] Several memory leaks exposed by unit test
[multifile] Several memory leaks exposed by unit test
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-11 07:15 UTC by Sebastian Dröge (slomo)
Modified: 2008-02-11 14:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multifile.patch (2.93 KB, patch)
2008-02-11 07:16 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2008-02-11 07:15:59 UTC
Hi,
the attached patch fixes several memory leaks that are exposed by the unit test. For example multifilesrc leaks everything it reads :)
Comment 1 Sebastian Dröge (slomo) 2008-02-11 07:16:51 UTC
Created attachment 104893 [details] [review]
multifile.patch
Comment 2 Sebastian Dröge (slomo) 2008-02-11 07:21:55 UTC
Also, why does it use g_file_get_contents()? This is a bit annoying if trying to read files that are rather large.
Comment 3 Tim-Philipp Müller 2008-02-11 09:51:43 UTC
> Also, why does it use g_file_get_contents()? This is a bit annoying if trying
> to read files that are rather large.

It's meant to produce one buffer per file and is supposed to be used only with files that easily fit into allocated memory.  Using mmap() here would entail the same problems that we've been seeing with filesrc, meaning that it's not really an option because we can't do decent error handling: if something goes wrong it might just take the entire app down.
Comment 4 Sebastian Dröge (slomo) 2008-02-11 14:01:20 UTC
2008-02-11  Sebastian Dröge  <slomo@circular-chaos.org>

	* gst/multifile/gstmultifilesrc.c: (gst_multi_file_src_create):
	* tests/check/elements/multifile.c: (GST_START_TEST):
	Close some memory leaks spotted by the unit test. Fixes bug #515697.