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 341873 - [alsasink] minor memory leak, uses unprotected static variable
[alsasink] minor memory leak, uses unprotected static variable
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal minor
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-15 15:57 UTC by Tim-Philipp Müller
Modified: 2006-05-15 16:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.58 KB, patch)
2006-05-15 15:58 UTC, Tim-Philipp Müller
committed Details | Review

Description Tim-Philipp Müller 2006-05-15 15:57:25 UTC
alsasink uses a

  static snd_output_t  *output;

variable unprotected. I don't think thread-safety is actually an issue here, but the allocated snd_output_t structure may leak if there is more than one alsasink instance at a time, because the second instance will just overwrite the previously allocated snd_output_t.

Patch attached. Might be a bit overdone, maybe we can just remove this stuff altogether?
Comment 1 Tim-Philipp Müller 2006-05-15 15:58:33 UTC
Created attachment 65510 [details] [review]
proposed patch
Comment 2 Tim-Philipp Müller 2006-05-15 16:47:15 UTC
Thanks for reviewing this.


 2006-05-15  Tim-Philipp Müller  <tim at centricular dot net>

       * ext/alsa/gstalsasink.c: (gst_alsasink_finalise),
       (gst_alsasink_init):
       * ext/alsa/gstalsasink.h:
         Don't leak allocated snd_output_t structure if there's
         more than one alsasink instance at a time (#341873).
         Also fix GObject macros in header file.