ext/alsa/gstalsadeviceprobe.c: Don't return before freeing up the allocated structures.
authorEdward Hervey <bilboed@bilboed.com>
Thu, 24 Apr 2008 09:27:35 +0000 (09:27 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 24 Apr 2008 09:27:35 +0000 (09:27 +0000)
Original commit message from CVS:
* ext/alsa/gstalsadeviceprobe.c:
(gst_alsa_get_device_list): Don't return before freeing up
the allocated structures.

ChangeLog
ext/alsa/gstalsadeviceprobe.c

index 1c4de1f..4649500 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-24  Edward Hervey  <edward.hervey@collabora.co.uk>
+
+       * ext/alsa/gstalsadeviceprobe.c:
+       (gst_alsa_get_device_list): Don't return before freeing up
+       the allocated structures.
+
 2008-04-24  Stefan Kost  <ensonic@users.sf.net>
 
        * gst/playback/gstplaybin.c:
index 7094c47..a4d8ecf 100644 (file)
@@ -67,7 +67,8 @@ gst_alsa_get_device_list (snd_pcm_stream_t stream)
 
   if (snd_card_next (&card) < 0 || card < 0) {
     /* no soundcard found */
-    return NULL;
+    GST_WARNING ("No soundcard found");
+    goto beach;
   }
 
   while (card >= 0) {
@@ -111,6 +112,7 @@ gst_alsa_get_device_list (snd_pcm_stream_t stream)
     }
   }
 
+beach:
   snd_ctl_card_info_free (info);
   snd_pcm_info_free (pcminfo);