GNOME Bugzilla – Bug 589797
alsasrc does not set GstAlsaSrc->handle to NULL after snd_pcm_close. causes crashes from places like gst_alsa_find_device_name
Last modified: 2009-07-27 13:37:40 UTC
Steps to reproduce: 1. 2. 3. Stack trace: Other information:
1) gstalsarc.c: 743: snd_pcm_close is not followed with alsa->handle = NULL; 2) also, on comparing gst_alsasrc_close and gstalsasink.c:gst_alsasink_close, some of the protection against errors seem to be missing. someone kindly take a look at this.
Created attachment 139269 [details] [review] alsasrc: set alsasrc->handle back to NULL when closing device
Seems sensible, and small enough to land in Thursday's release... please commit
commit 01e0fdd86c65123130147f64be33606bf2cca26b Author: Balachandran C <balachandran_c@rediffmail.com> Date: Mon Jul 27 10:29:27 2009 +0100 alsasrc: set alsasrc->handle back to NULL when closing device Fixes crashes in gst_alsa_find_device_name() when probing or reading the device-name property (e.g. when doing a dot-file dump). Fixes #589797. (Ignored the error handling issue here; not sure if this will ever be triggered, but even if I'm not sure if it's better to just leak the descriptor and reset the handle to NULL like alsasrc currently does, or to keep the handle open and return FALSE like alsasink does.)